smeserver-webfilter/createlinks

54 lines
2.0 KiB
Perl

#!/usr/bin/perl -w
use esmith::Build::CreateLinks qw(:all);
my $pkg= "smeserver-webfilter";
my $update_event = "${pkg}-update";
foreach my $event (qw/bootstrap-console-save http-proxy-update smeserver-webfilter-update /){
templates2events("/etc/squid/squid.conf", $event);
templates2events("/etc/squid/squidGuard.conf", $event);
templates2events("/usr/share/squidGuard/conf.txt", $event);
templates2events("/etc/cron.daily/squidGuard", $event);
templates2events("/etc/logrotate.d/squidGuard", $event);
templates2events("/etc/squidclamav.conf", $event);
templates2events("/etc/e-smith/sql/init/squiddblogd", $event);
};
event_services($update_event, qw(
squidGuard restart
httpd-e-smith restart
transparent-proxying restart
));
# squid-db-logd restart
safe_symlink("restart", "root/etc/e-smith/events/http-proxy-update/services2adjust/mysql.init");
safe_symlink("restart", "root/etc/e-smith/events/http-proxy-update/services2adjust/squid-db-logd");
event_link("squidguard-update-databases", 'http-proxy-update', "10");
safe_symlink("/etc/e-smith/templates-default/template-begin-shell", "root/etc/e-smith/templates/etc/cron.daily/squidGuard/template-begin");
panel_link("webfilter", "manager");
safe_touch('root/var/squidGuard/blacklists/black/domains');
safe_touch('root/var/squidGuard/blacklists/black/urls');
safe_touch('root/var/squidGuard/blacklists/white/domains');
safe_touch('root/var/squidGuard/blacklists/white/urls');
safe_touch('root/var/service/squid-db-logd/down');
safe_touch('root/var/log/squidGuard/deny.log');
safe_touch('root/var/log/squidGuard/white.log');
safe_touch('root/var/log/squidGuard/squidGuard.log');
#safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/squid-db-logd');
#safe_symlink("/var/service/squid-db-logd" , 'root/service/squid-db-logd');
#service_link_enhanced("squid-db-logd", "S98", "7");
#service_link_enhanced("squid-db-logd", "K15", "6");
#service_link_enhanced("squid-db-logd", "K35", "0");
#service_link_enhanced("squid-db-logd", "K35", "1");