smeserver-openvpn-s2s/createlinks

54 lines
1.8 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-s2s-update/services2adjust/openvpn-s2s");
safe_symlink("adjust", "root/etc/e-smith/events/openvpn-s2s-update/services2adjust/masq");
event_link("openvpn-s2s-onelink", "openvpn-s2s-update-one", "50");
event_link("openvpn-s2s-delete-networks", "openvpn-s2s-update", "10");
event_link("openvpn-s2s-genconf", "openvpn-s2s-update", "20");
event_link("openvpn-s2s-update-crl", "openvpn-s2s-update", "30");
event_link("openvpn-s2s-genconf", "bootstrap-console-save", "80");
event_link("openvpn-s2s-jail", "bootstrap-console-save", "03");
event_link("openvpn-s2s-jail", "openvpn-s2s-update", "03");
templates2events("/etc/rc.d/init.d/masq", qw/openvpn-s2s-update/);
templates2events("/etc/crontab", qw/openvpn-s2s-update/);
panel_link("openvpns2s", 'manager');
# our event specific for updating with yum without reboot
$event = "smeserver-openvpn-s2s-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/rc.d/init.d/masq
/etc/crontab
))
{
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-s2s-jail", $event, "03");
event_link("openvpn-s2s-update", $event, "60");
#services we need to restart
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/openvpn-s2s");
use esmith::Build::Backup qw(:all);
backup_includes("smeserver-openvpn-s2s", qw(
/etc/openvpn/s2s/priv
/etc/openvpn/s2s/pub
/var/log/openvpn-s2s
));