smeserver-email/createlinks

139 lines
4.2 KiB
Plaintext
Raw Permalink Normal View History

#!/usr/bin/perl -w
use esmith::Build::CreateLinks qw(:all);
use File::Basename;
use File::Path;
# email-conf - console-save, bootstrap-console-save, domain-create, domain-delete,
# ip-change, email-update, host-create, host-delete, host-modify, post-upgrade
foreach (qw(
/etc/fetchmail
/etc/startmail
))
{
templates2events($_, qw(
console-save
bootstrap-console-save
domain-create
domain-delete
ip-change
email-update
host-create
host-delete
host-modify
post-upgrade
));
}
event_link('fetchmail-migrate-fetchids', "bootstrap-console-save", '91');
# pine-conf
for ( qw(/etc/pine.conf /etc/Muttrc) )
{
templates2events($_, qw(console-save bootstrap-console-save email-update));
}
#--------------------------------------------------
# functions for manager panel
#--------------------------------------------------
my $panel = "manager";
panel_link("emailsettings", $panel);
panel_link("pseudonyms", $panel);
#--------------------------------------------------
# actions for console-save event:
# write config files and create startup link
#--------------------------------------------------
$event = "console-save";
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/smtp-auth-proxy");
event_link('fetchmail-migrate-fetchids', $event, '91');
#--------------------------------------------------
# actions for domain-create event:
# rewrite config files and restart server
#--------------------------------------------------
$event = "domain-create";
#--------------------------------------------------
# actions for domain-delete event:
# rewrite config files and restart server
#--------------------------------------------------
$event = "domain-delete";
#--------------------------------------------------
# actions for email-update event:
# email parameters have been changed in the e-smith
# manager; update system security, rewrite email config
# files, configure other system files (crontab is the
# important one), and restart server
#--------------------------------------------------
$event = "email-update";
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/smtp-auth-proxy");
event_link('fetchmail-migrate-fetchids', $event, '91');
#--------------------------------------------------
# actions for group-create event:
#--------------------------------------------------
$event = "group-create";
#--------------------------------------------------
# actions for group-delete event:
#--------------------------------------------------
$event = "group-delete";
#--------------------------------------------------
# actions for group-modify event:
#--------------------------------------------------
$event = "group-modify";
#--------------------------------------------------
# actions for user-create event:
#--------------------------------------------------
$event = "user-create";
#--------------------------------------------------
# actions for user-modify event
#--------------------------------------------------
$event = "user-modify";
#--------------------------------------------------
# actions for user-delete event
#--------------------------------------------------
$event = "user-delete";
#--------------------------------------------------
# actions for ip-up event:
#--------------------------------------------------
$event = "ip-up";
event_link("email-ipup", $event, "20");
#--------------------------------------------------
# actions for ip-up event:
#--------------------------------------------------
$event = "ip-change";
#--------------------------------------------------
# actions for smeserver-email-update event:
#--------------------------------------------------
$event = "smeserver-email-update";
# systemd-specific action mandatory for this package-update event
event_link("systemd-reload", $event, "89");
event_link("systemd-default", $event, "88");
event_link('fetchmail-migrate-fetchids', $event, '91');
safe_symlink("try-restart", "root/etc/e-smith/events/$event/services2adjust/smtp-auth-proxy");
#--------------------------------------------------
# actions for pseudonym-{create,delete,modify}
#--------------------------------------------------
foreach $event ( qw(pseudonym-create pseudonym-modify pseudonym-delete) )
{
}