#! /usr/bin/perl -w use esmith::Build::CreateLinks qw(:all); my $event; # Runlevel init links. #service_link_enhanced("zoneminder", "S99", "7"); # create zoneminder-update event $event="zoneminder-update"; templates2events("/etc/e-smith/sql/init/30zoneminder", $event); templates2events("/etc/httpd/conf/httpd.conf", $event); templates2events("/etc/zm/zm.conf", $event); templates2events("/etc/opt/remi/php74/php-fpm.d/www.conf", $event); event_link("zoneminder", $event, "10"); safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith"); safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/php74-php-fpm"); # add expand zm.conf foreach my $event (qw(post-upgrade bootstrap-console-save console-save remoteaccess-update php-update webapps-update)){ templates2events("/etc/zm/zm.conf", $event); event_link("zoneminder", $event, "10"); } # our event specific for updating with yum without reboot $event = "smeserver-zoneminder-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/zm/zm.conf /etc/httpd/conf/httpd.conf /etc/e-smith/sql/init/30zoneminder /etc/opt/remi/php74/php-fpm.d/www.conf )) { 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("conf-timezone", $event, "30"); #services we need to restart safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith"); safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/mysql.init"); safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/zoneminder"); safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/php74-php-fpm"); use esmith::Build::Backup qw(:all); backup_includes("smeserver-zoneminder", qw( /var/lib/zoneminder /var/log/zoneminder ));