#!/usr/bin/perl -w use esmith::Build::CreateLinks qw(:all); safe_symlink("restart", "root/etc/e-smith/events/openvpn-routed-update/services2adjust/openvpn-routed"); safe_symlink("restart", "root/etc/e-smith/events/network-create/services2adjust/openvpn-routed"); safe_symlink("restart", "root/etc/e-smith/events/network-delete/services2adjust/openvpn-routed"); #service_link_enhanced("openvpn-routed", "S80", "7"); #service_link_enhanced("openvpn-routed", "K25", "6"); #service_link_enhanced("openvpn-routed", "K25", "0"); #safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/openvpn-routed'); safe_symlink("/var/service/openvpn-routed" , 'root/service/openvpn-routed'); safe_touch("root/var/service/openvpn-routed/down"); safe_touch("root/etc/e-smith/templates/etc/openvpn/routed/management-pass.txt/template-begin"); safe_touch("root/etc/e-smith/templates/etc/openvpn/routed/management-pass.txt/template-end"); #panel_link("openvpnrouted", 'manager'); templates2events("/etc/openvpn/routed/openvpn.conf", "openvpn-routed-update"); templates2events("/etc/openvpn/routed/management-pass.txt", qw(openvpn-routed-update bootstrap-console-save)); templates2events("/etc/openvpn/routed/openvpn.conf", qw(openvpn-routed-update bootstrap-console-save network-create network-delete)); templates2events("/etc/crontab", qw(openvpn-routed-update)); #event_link("openvpn-routed-reload-ccd", "openvpn-routed-update", "20"); event_link("openvpn-routed-update-crl", "openvpn-routed-update", "30"); event_link("openvpn-routed-delete-net", "openvpn-routed-update", "40"); event_link("openvpn-bridge-jail", "openvpn-routed-update", "03"); event_link("openvpn-bridge-jail", "bootstrap-console-save", "03"); #event_link("openvpn-routed-reload-ccd", "openvpn-routed-reload-ccd", "20"); #event_link("openvpn-routed-update-crl", "openvpn-routed-reload-ccd", "30"); # our event specific for updating with yum without reboot $event = "smeserver-openvpn-routed-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/crontab /etc/openvpn/routed/management-pass.txt /etc/openvpn/routed/openvpn.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("openvpn-routed-update", $event, "60"); event_link("openvpn-bridge-jail", $event, "03"); #services we need to restart safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/openvpn-routed"); use esmith::Build::Backup qw(:all); backup_includes("smeserver-openvpn-routed", qw( /etc/openvpn/routed/priv /etc/openvpn/routed/pub /var/log/openvpn-routed ));