2023-07-12 10:06:18 +02:00
|
|
|
#! /usr/bin/perl -w
|
|
|
|
|
|
|
|
use esmith::Build::CreateLinks qw(:all);
|
|
|
|
|
|
|
|
my $event;
|
|
|
|
foreach $event (qw(
|
|
|
|
console-save
|
|
|
|
bootstrap-console-save
|
|
|
|
network-create
|
|
|
|
network-delete
|
|
|
|
proxy-update
|
2024-04-04 16:12:34 +02:00
|
|
|
smeserver-proxy-update
|
2023-07-12 10:06:18 +02:00
|
|
|
))
|
|
|
|
{
|
|
|
|
templates2events("/etc/httpd/conf/proxy/proxy.pac", $event);
|
|
|
|
templates2events("/etc/squid/squid.conf", $event);
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach $event (qw(
|
|
|
|
network-create
|
|
|
|
network-delete
|
|
|
|
console-save
|
|
|
|
proxy-update
|
2024-04-04 16:12:34 +02:00
|
|
|
smeserver-proxy-update
|
2023-07-12 10:06:18 +02:00
|
|
|
))
|
|
|
|
{
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/squid");
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach $event (qw(
|
|
|
|
proxy-update
|
2024-04-04 16:12:34 +02:00
|
|
|
smeserver-proxy-update
|
2023-07-12 10:06:18 +02:00
|
|
|
))
|
|
|
|
{
|
|
|
|
templates2events("/etc/rc.d/init.d/masq", "$event");
|
|
|
|
templates2events("/etc/crontab", "$event");
|
|
|
|
templates2events("/etc/dhcpd.conf", "$event");
|
|
|
|
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/masq");
|
|
|
|
}
|
|
|
|
|
|
|
|
# Symlink for the cgi.
|
|
|
|
panel_link("proxy", "manager");
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
2024-04-04 16:12:34 +02:00
|
|
|
# specific actions for smeserver-proxy-update event
|
2023-07-12 10:06:18 +02:00
|
|
|
#--------------------------------------------------
|
2024-04-04 16:12:34 +02:00
|
|
|
$event = "smeserver-proxy-update";
|
2023-07-12 10:06:18 +02:00
|
|
|
|
|
|
|
templates2events("/etc/systemd/system-preset/49-koozali.preset", $event);
|
|
|
|
templates2events("/usr/lib/systemd/system/squid.service.d/50koozali.conf", $event);
|
|
|
|
event_link("systemd-reload", $event, "89");
|
|
|
|
|
|
|
|
foreach $event (qw(
|
|
|
|
post-install
|
|
|
|
post-upgrade
|
|
|
|
))
|
|
|
|
{
|
|
|
|
templates2events("/usr/lib/systemd/system/squid.service.d/50koozali.conf", $event);
|
|
|
|
}
|
|
|
|
|