smeserver-phpki-ng/createlinks

61 lines
2.3 KiB
Plaintext
Raw Normal View History

#!/usr/bin/perl -w
use esmith::Build::CreateLinks qw(:all);
# Start and stop links
#service_link_enhanced("httpd-pki", "S86", "7");
#service_link_enhanced("httpd-pki", "K15", "6");
#service_link_enhanced("httpd-pki", "K15", "0");
#service_link_enhanced("httpd-pki", "K15", "1");
#safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/httpd-pki');
#safe_symlink("/var/service/httpd-pki" , 'root/service/httpd-pki');
# Panel links
panel_link("phpki", 'manager');
# Events links
event_link("phpki-fixtakey", qw(bootstrap-console-save post-upgrade), "50");
event_link("phpki-fixownership", qw(bootstrap-console-save post-upgrade), "02");
templates2events("/etc/httpd/pki-conf/httpd.conf", qw(bootstrap-console-save conf-userpanel domain-modify));
safe_symlink("restart", "root/etc/e-smith/events/conf-userpanel/services2adjust/httpd-pki");
safe_symlink("restart", "root/etc/e-smith/events/domain-modify/services2adjust/httpd-pki");
safe_symlink("restart", "root/etc/e-smith/events/logrotate/services2adjust/httpd-pki");
# our event specific for updating with yum without reboot
$event = "smeserver-phpki-ng-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/systemd/system-preset/49-koozali.preset
/etc/httpd/conf/httpd.conf
/etc/httpd/pki-conf/httpd.conf
/etc/opt/remi/php73/php-fpm.d/www.conf
/opt/phpki/html/config.php
))
{
templates2events( $file, $event );
}
#action needed in case we have a systemd unit
event_link("systemd-default", $event, "10");
event_link("systemd-reload", $event, "50");
#action specific to this package
event_link("phpki-fixownership", $event, "02");
event_link("phpki-fixtakey", $event, "50");
#event_link("conf-timezone", $event, "30");
#services we need to restart
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-pki");
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/php73-php-fpm");
use esmith::Build::Backup qw(:all);
backup_includes("smeserver-phpki-ng", qw(
/opt/phpki/
));