initial commit of file from CVS for e-smith-pptpd on Wed 12 Jul 09:04:53 BST 2023
This commit is contained in:
69
createlinks
Normal file
69
createlinks
Normal file
@@ -0,0 +1,69 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use esmith::Build::CreateLinks qw(:all);
|
||||
|
||||
#--------------------------------------------------
|
||||
# general pptpd configuration
|
||||
#--------------------------------------------------
|
||||
foreach (qw(dhcpd.conf pptpd.conf ppp/options.pptpd))
|
||||
{
|
||||
templates2events("/etc/$_", qw(
|
||||
console-save
|
||||
bootstrap-console-save
|
||||
workgroup-update
|
||||
remoteaccess-update
|
||||
ip-change
|
||||
password-modify
|
||||
user-create
|
||||
user-modify
|
||||
user-modify-admin
|
||||
user-delete
|
||||
e-smith-pptpd-update
|
||||
));
|
||||
}
|
||||
foreach (qw(ppp/ip-up.local ppp/ip-down.local))
|
||||
{
|
||||
templates2events("/etc/$_", qw(
|
||||
workgroup-update
|
||||
remoteaccess-update
|
||||
ip-change
|
||||
password-modify
|
||||
user-create
|
||||
user-modify
|
||||
user-modify-admin
|
||||
user-delete
|
||||
e-smith-pptpd-update
|
||||
));
|
||||
}
|
||||
|
||||
foreach $event ( qw(
|
||||
console-save
|
||||
remoteaccess-update
|
||||
ip-change
|
||||
) )
|
||||
{
|
||||
safe_symlink("sigterm", "root/etc/e-smith/events/$event/services2adjust/pptpd");
|
||||
}
|
||||
|
||||
# allowing and denying network access
|
||||
foreach $event (qw(ip-up.pptpd ip-down))
|
||||
{
|
||||
event_link("pptp-interface-access", $event, "70");
|
||||
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/masq");
|
||||
}
|
||||
|
||||
event_link("clear-pptp-interfaces", "local", "50");
|
||||
|
||||
templates2events("/etc/rc.d/init.d/masq", qw(ip-up.pptpd ip-down));
|
||||
|
||||
|
||||
#--------------------------------------------------
|
||||
# actions for e-smith-pptpd-update event:
|
||||
#--------------------------------------------------
|
||||
$event = "e-smith-pptpd-update";
|
||||
# systemd-specific action mandatory for this package-update event
|
||||
event_link("systemd-reload", $event, "89");
|
||||
event_link("systemd-default", $event, "88");
|
||||
safe_symlink("try-restart", "root/etc/e-smith/events/$event/services2adjust/pptpd");
|
||||
safe_symlink("reload", "root/etc/e-smith/events/$event/services2adjust/masq");
|
||||
|
Reference in New Issue
Block a user