smeserver-fetchmail/createlinks

57 lines
2.0 KiB
Plaintext
Raw Permalink Normal View History

#!/usr/bin/perl -w
use esmith::Build::CreateLinks qw(:all);
# our event specific for updating with yum without reboot
$event = 'smeserver-fetchmail-update';
#add here the path to your templates needed to expand
#see the /etc/systemd/system-preset/49-koozali.preset should be present for systemd integration on all you yum update event
foreach my $file (qw(
/etc/fetchmail
/etc/startmail
/etc/crontab
))
{
templates2events( $file, $event );
}
#action needed in case we have a systemd unit
event_link('systemd-default', $event, '88');
event_link('systemd-reload', $event, '89');
#--------------------------------------------------
# functions for manager panel
#--------------------------------------------------
my $panel = "manager";
panel_link("fetchmail", $panel);
#--------------------------------------------------
# actions for console-save event:
#--------------------------------------------------
event_link("user-update-fetchmail", "user-create", "25");
event_link("user-update-fetchmail", "user-modify" ,"25");
event_link("user-update-fetchmail", "user-delete", "90");
event_link("fetchmail-email-group-adjust", "user-delete", "25");
#--------------------------------------------------
# an event launched if case of routing modification
#--------------------------------------------------
templates2events("/etc/rc.d/init.d/masq", qw(fetchmail-routing));
safe_symlink("adjust",
"root/etc/e-smith/events/fetchmail-routing/services2adjust/masq");
#--------------------------------------------------
# an event launched if case of fetchmail conf change
#--------------------------------------------------
templates2events("/etc/fetchmail", qw(fetchmail-change));
templates2events("/etc/crontab", qw(fetchmail-change));
templates2events("/etc/startmail", qw(fetchmail-change));
event_link("fetchmail-email-group-adjust", "fetchmail-change", "30");
event_link("conf-fetchmail-group-files", "fetchmail-change", "50");
safe_symlink("adjust",
"root/etc/e-smith/events/fetchmail-change/services2adjust/masq");