Skip to content
addurl 348 B
Newer Older
#!/bin/bash

URL=`action-get url`

if ! grep -Fxq "http_access allow allowedurls" /etc/squid/squid.conf
then
    sed  -i '/^# And finally deny all .*/i http_access allow allowedurls\n' /etc/squid/squid.conf
fi

sed -i "/^http_access allow allowedurls.*/i acl allowedurls dstdomain \.$URL" /etc/squid/squid.conf

kill -HUP `cat /var/run/squid.pid`