Skip to content

Instantly share code, notes, and snippets.

@Hanivan
Last active November 14, 2024 10:53
Show Gist options
  • Select an option

  • Save Hanivan/1bc7c4fb7c9c2378a869f3dd5da5875d to your computer and use it in GitHub Desktop.

Select an option

Save Hanivan/1bc7c4fb7c9c2378a869f3dd5da5875d to your computer and use it in GitHub Desktop.

Revisions

  1. Hanivan renamed this gist Oct 3, 2024. 1 changed file with 8 additions and 3 deletions.
    11 changes: 8 additions & 3 deletions Setup Proxy VM → Setup Proxy VM.md
    Original file line number Diff line number Diff line change
    @@ -4,25 +4,29 @@ sudo apt install squid -y
    Edit /etc/squid/squid.conf
    Update
    > http_access deny all
    To

    > http_access allow all
    http_port <your-custom-port>
    http_port `your-custom-port`

    Create file at `/use/lib/systemd/system`
    Create file at `/usr/lib/systemd/system`

    Filename: squid-timer.service
    =============================
    ```bash
    [Unit]
    Description=Service to trigger Squid restart timer

    [Service]
    Type=oneshot
    ExecStart=/bin/systemctl restart squid.service

    ```

    Filename: squid-timer.timer
    ===========================
    ```bash
    [Unit]
    Description=Timer to restart Squid every 30 minutes

    @@ -32,3 +36,4 @@ Persistent=true

    [Install]
    WantedBy=timers.target
    ```
  2. Hanivan revised this gist Oct 3, 2024. 1 changed file with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions Setup Proxy VM
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,14 @@
    Install package squid
    sudo apt install squid -y

    Edit /etc/squid/squid.conf
    Update
    > http_access deny all
    To
    > http_access allow all

    http_port <your-custom-port>

    Create file at `/use/lib/systemd/system`

    Filename: squid-timer.service
  3. Hanivan revised this gist Oct 3, 2024. 1 changed file with 1 addition and 4 deletions.
    5 changes: 1 addition & 4 deletions Setup Proxy VM
    Original file line number Diff line number Diff line change
    @@ -2,18 +2,16 @@ Create file at `/use/lib/systemd/system`

    Filename: squid-timer.service
    =============================
    ```bash
    [Unit]
    Description=Service to trigger Squid restart timer

    [Service]
    Type=oneshot
    ExecStart=/bin/systemctl restart squid.service
    ```


    Filename: squid-timer.timer
    ===========================
    ```bash
    [Unit]
    Description=Timer to restart Squid every 30 minutes

    @@ -23,4 +21,3 @@ Persistent=true

    [Install]
    WantedBy=timers.target
    ```
  4. Hanivan created this gist Oct 3, 2024.
    26 changes: 26 additions & 0 deletions Setup Proxy VM
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    Create file at `/use/lib/systemd/system`

    Filename: squid-timer.service
    =============================
    ```bash
    [Unit]
    Description=Service to trigger Squid restart timer

    [Service]
    Type=oneshot
    ExecStart=/bin/systemctl restart squid.service
    ```

    Filename: squid-timer.timer
    ===========================
    ```bash
    [Unit]
    Description=Timer to restart Squid every 30 minutes

    [Timer]
    OnCalendar=*:0/30
    Persistent=true

    [Install]
    WantedBy=timers.target
    ```