smeserver-openvpn-bridge/createlinks

58 lines
2.3 KiB
Plaintext
Raw Normal View History

#!/usr/bin/perl -w
use esmith::Build::CreateLinks qw(:all);
safe_symlink("restart", "root/etc/e-smith/events/openvpn-bridge-update/services2adjust/openvpn-bridge");
safe_symlink("restart", "root/etc/e-smith/events/network-create/services2adjust/openvpn-bridge");
safe_symlink("restart", "root/etc/e-smith/events/network-delete/services2adjust/openvpn-bridge");
panel_link("openvpnbridge", 'manager');
templates2events("/etc/openvpn/bridge/openvpn.conf", "openvpn-bridge-update");
templates2events("/etc/openvpn/bridge/management-pass.txt", qw(openvpn-bridge-update bootstrap-console-save));
templates2events("/etc/openvpn/bridge/openvpn.conf", qw(openvpn-bridge-update bootstrap-console-save network-create network-delete));
templates2events("/etc/crontab", qw(openvpn-bridge-update));
event_link("openvpn-bridge-reload-ccd", "openvpn-bridge-update", "20");
event_link("openvpn-bridge-update-crl", "openvpn-bridge-update", "30");
event_link("openvpn-bridge-reload-ccd", "openvpn-bridge-reload-ccd", "20");
event_link("openvpn-bridge-update-crl", "openvpn-bridge-reload-ccd", "30");
event_link("openvpn-bridge-jail", "openvpn-bridge-update" , "03");
event_link("openvpn-bridge-jail", "bootstrap-console-save" , "03");
# our event specific for updating with yum without reboot
$event = "smeserver-openvpn-bridge-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/bridge/management-pass.txt
/etc/openvpn/bridge/openvpn.conf
))
{
templates2events( $file, $event );
}
#action needed in case we have a systemd unit
event_link("systemd-default", $event, "88");
event_link("systemd-reload", $event, "89");
event_link("openvpn-bridge-jail", $event, "03");
#action specific to this package
event_link("openvpn-bridge-update", $event, "60");
#services we need to restart
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/openvpn-bridge");
use esmith::Build::Backup qw(:all);
backup_includes("smeserver-openvpn-bridge", qw(
/etc/openvpn/bridge/priv
/etc/openvpn/bridge/pub
/var/log/openvpn-bridge
));