smeserver-spamassassin/createlinks

44 lines
1.3 KiB
Perl

#!/usr/bin/perl -w
use esmith::Build::CreateLinks qw(:all);
use File::Basename;
use File::Path;
#--------------------------------------------------
# functions for manager panel
#--------------------------------------------------
# my $panel = "manager";
# panel_link("otheremail", $panel);
my $event;
foreach (qw(
/etc/mail/spamassassin/local.cf
/etc/sysconfig/spamassassin
))
{
templates2events("$_",qw(
post-install
post-upgrade
bootstrap-console-save
console-save
email-update
smeserver-spamassassin-update
));
}
# spamassassin-update events
$event="smeserver-spamassassin-update";
event_link("systemd-default", $event, "88"); # updates all the service files etc
event_link("systemd-reload", $event, "89"); # systemctl daemon-reload
event_link("spamassassin-update", $event, "99"); # Hopefully restarts spamassassin
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/spamassassin");
templates2events("/etc/rsyslog.conf",$event);
templates2events("/etc/sysconfig/spamassassin",$event);
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyslog");
# email-update events required?
$event = "email-update";
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/spamassassin");