campus-total-block/Makefile

49 lines
2.4 KiB
Makefile
Raw Permalink Normal View History

2024-02-12 01:42:36 +02:00
all:
echo OK
install:
mkdir -p /etc/squid/bin
cp -vf dst-domain-match-check.rb /etc/squid/bin/
cp -vf user-list-dst-domain-match-check.rb /etc/squid/bin/
2024-02-12 01:42:36 +02:00
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
stat /etc/squid/users-blacklist.ini || cp -vf users-blacklist.ini /etc/squid/;true
stat /etc/squid/users-whitelist.ini || cp -vf users-whitelist.ini /etc/squid/;true
2024-02-12 01:42:36 +02:00
chmod +x /etc/squid/bin/dst-domain-match-check.rb
chmod +x /etc/squid/bin/user-list-dst-domain-match-check.rb
2024-02-12 01:42:36 +02:00
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/
cp -vf users-blacklist.service /etc/systemd/system/
cp -vf users-whitelist.service /etc/systemd/system/
2024-02-12 01:42:36 +02:00
systemctl daemon-reload
start-services:
systemctl start dst-total-block campus-testing-whitelist-check campus-testing-blacklist-check campus-whitelist-check campus-blacklist-check users-whitelist users-blacklist
2024-02-12 01:42:36 +02:00
stop-services:
systemctl start dst-total-block campus-testing-whitelist-check campus-testing-blacklist-check campus-whitelist-check campus-blacklist-check users-whitelist users-blacklist
2024-02-12 01:42:36 +02:00
enable-services:
systemctl enable dst-total-block campus-testing-whitelist-check campus-testing-blacklist-check campus-whitelist-check campus-blacklist-check users-whitelist users-blacklist
2024-02-12 01:42:36 +02:00
restart-services:
systemctl restart dst-total-block campus-testing-whitelist-check campus-testing-blacklist-check campus-whitelist-check campus-blacklist-check users-whitelist users-blacklist
2024-02-12 01:42:36 +02:00
cleanup-sockets:
rm -vf /tmp/campus-*
rm -vf /tmp/users-*
2024-02-12 01:42:36 +02:00
rm -vf /tmp/total-block