188 lines
6.4 KiB
Perl
Executable File
188 lines
6.4 KiB
Perl
Executable File
#!/usr/bin/perl -w
|
|
|
|
use esmith::Build::CreateLinks qw(:all);
|
|
#--------------------------------------------------
|
|
# actions for e-smith-apache-update
|
|
#--------------------------------------------------
|
|
my $event = "e-smith-apache-update";
|
|
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
|
event_link("systemd-reload", $event, "89");
|
|
event_link("systemd-default", $event, "88");
|
|
templates2events("/etc/logrotate.d/httpd", $event);
|
|
|
|
#--------------------------------------------------
|
|
# actions for console-save event
|
|
#--------------------------------------------------
|
|
my $event = "console-save";
|
|
|
|
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
|
|
|
#--------------------------------------------------
|
|
# actions for bootstrap-console-save event
|
|
#--------------------------------------------------
|
|
$event = "bootstrap-console-save";
|
|
|
|
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
|
templates2events("/etc/logrotate.d/httpd", $event);
|
|
|
|
#--------------------------------------------------
|
|
# actions for domain-create event
|
|
#--------------------------------------------------
|
|
|
|
$event = "domain-create";
|
|
|
|
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
|
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
|
|
|
#--------------------------------------------------
|
|
# actions for domain-delete event
|
|
#--------------------------------------------------
|
|
|
|
$event = "domain-delete";
|
|
|
|
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
|
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
|
|
|
#--------------------------------------------------
|
|
# actions for domain-modify event
|
|
#--------------------------------------------------
|
|
|
|
$event = "domain-modify";
|
|
|
|
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
|
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
|
|
|
#--------------------------------------------------
|
|
# actions for host-create event
|
|
#--------------------------------------------------
|
|
|
|
$event = "host-create";
|
|
|
|
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
|
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
|
|
|
#--------------------------------------------------
|
|
# actions for host-delete event
|
|
#--------------------------------------------------
|
|
|
|
$event = "host-delete";
|
|
|
|
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
|
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
|
|
|
#--------------------------------------------------
|
|
# actions for host-modify event
|
|
#--------------------------------------------------
|
|
|
|
$event = "host-modify";
|
|
|
|
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
|
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
|
|
|
#--------------------------------------------------
|
|
# actions for ibay-create event
|
|
#--------------------------------------------------
|
|
|
|
$event = "ibay-create";
|
|
|
|
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
|
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
|
|
|
#--------------------------------------------------
|
|
# actions for ibay-delete event
|
|
#--------------------------------------------------
|
|
|
|
$event = "ibay-delete";
|
|
|
|
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
|
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
|
|
|
#--------------------------------------------------
|
|
# actions for ibay-modify event
|
|
# (used after changing parameters for a single i-bay)
|
|
#--------------------------------------------------
|
|
|
|
$event = "ibay-modify";
|
|
|
|
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
|
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
|
|
|
#--------------------------------------------------
|
|
# actions for ibay-modify-servers event
|
|
# (used after changing the group of several i-bays in sequence)
|
|
#--------------------------------------------------
|
|
|
|
$event = "ibay-modify-servers";
|
|
|
|
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
|
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
|
|
|
#--------------------------------------------------
|
|
# actions for network-create event
|
|
#--------------------------------------------------
|
|
|
|
$event = "network-create";
|
|
|
|
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
|
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
|
|
|
#--------------------------------------------------
|
|
# actions for network-delete event
|
|
#--------------------------------------------------
|
|
|
|
$event = "network-delete";
|
|
|
|
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
|
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
|
|
|
#--------------------------------------------------
|
|
# actions for remoteaccess-update event
|
|
#--------------------------------------------------
|
|
|
|
$event = "remoteaccess-update";
|
|
|
|
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
|
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
|
|
|
#--------------------------------------------------
|
|
# actions for email-update event
|
|
#--------------------------------------------------
|
|
|
|
$event = "email-update";
|
|
|
|
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
|
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
|
|
|
#--------------------------------------------------
|
|
# actions for logrotate event
|
|
#--------------------------------------------------
|
|
|
|
$event = "logrotate";
|
|
|
|
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
|
|
|
#--------------------------------------------------
|
|
# actions for ssl-update event
|
|
#--------------------------------------------------
|
|
|
|
$event = "ssl-update";
|
|
templates2events("/etc/httpd/conf/httpd.conf", $event);
|
|
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
|
|
|
#--------------------------------------------------
|
|
# actions for post-install event
|
|
#--------------------------------------------------
|
|
|
|
$event = "post-install";
|
|
templates2events("/etc/logrotate.d/httpd", $event);
|
|
|
|
#--------------------------------------------------
|
|
# actions for post-upgrade event
|
|
#--------------------------------------------------
|
|
|
|
$event = "post-upgrade";
|
|
templates2events("/etc/logrotate.d/httpd", $event);
|
|
|