campus-total-block/Makefile
2024-02-12 01:42:36 +02:00

44 lines
1.8 KiB
Makefile

all:
echo OK
install:
mkdir -p /etc/squid/bin
cp -vf dst-domain-match-check.rb /etc/squid/bin/
stat /etc/squid/dst-total-block-check.ini || cp -vf dst-total-block-check.ini /etc/squid/dst-total-block-check.ini;true
stat /etc/squid/campus-testing-blacklist-check.ini || cp -vf campus-testing-blacklist-check.ini /etc/squid/;true
stat /etc/squid/campus-testing-whitelist-check.ini || cp -vf campus-testing-whitelist-check.ini /etc/squid/;true
stat /etc/squid/campus-whitelist-check.ini || cp -vf campus-whitelist-check.ini /etc/squid/;true
stat /etc/squid/campus-blacklist-check.ini || cp -vf campus-blacklist-check.ini /etc/squid/;true
chmod +x /etc/squid/bin/dst-domain-match-check.rb
install-debian-dependencies:
apt update
apt install -y ruby ruby-mysql2
gem install ipaddress
gem install inifile
install-services:
cp -vf dst-total-block.service /etc/systemd/system/
cp -vf campus-testing-whitelist-check.service /etc/systemd/system/
cp -vf campus-testing-blacklist-check.service /etc/systemd/system/
cp -vf campus-whitelist-check.service /etc/systemd/system/
cp -vf campus-blacklist-check.service /etc/systemd/system/
systemctl daemon-reload
start-services:
systemctl start dst-total-block campus-testing-whitelist-check campus-testing-blacklist-check campus-whitelist-check campus-blacklist-check
stop-services:
systemctl start dst-total-block campus-testing-whitelist-check campus-testing-blacklist-check campus-whitelist-check campus-blacklist-check
enable-services:
systemctl enable dst-total-block campus-testing-whitelist-check campus-testing-blacklist-check campus-whitelist-check campus-blacklist-check
restart-services:
systemctl restart dst-total-block campus-testing-whitelist-check campus-testing-blacklist-check campus-whitelist-check campus-blacklist-check
cleanup-sockets:
rm -vf /tmp/campus-*
rm -vf /tmp/total-block