e-smith-proxy/createlinks

61 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

#! /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
e-smith-proxy-update
))
{
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
e-smith-proxy-update
))
{
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/squid");
}
foreach $event (qw(
proxy-update
e-smith-proxy-update
))
{
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");
#--------------------------------------------------
# specific actions for e-smith-proxy-update event
#--------------------------------------------------
$event = "e-smith-proxy-update";
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);
}