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.

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 /usr/lib/systemd/system

Filename: squid-timer.service

[Unit]
Description=Service to trigger Squid restart timer

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

Filename: squid-timer.timer

[Unit]
Description=Timer to restart Squid every 30 minutes

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

[Install]
WantedBy=timers.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment