70 lines
1.7 KiB
Plaintext
70 lines
1.7 KiB
Plaintext
|
#!/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");
|
||
|
|