2023-07-12 10:02:33 +02:00
|
|
|
#!/usr/bin/perl -w
|
|
|
|
|
|
|
|
use esmith::Build::CreateLinks qw(:all);
|
|
|
|
|
2024-04-04 16:12:24 +02:00
|
|
|
templates2events("/etc/ulogd.conf", qw(post-install post-upgrade smeserver-packetfilter-update));
|
2023-07-12 10:02:33 +02:00
|
|
|
|
|
|
|
# conf-masq
|
|
|
|
|
|
|
|
templates2events("/etc/rc.d/init.d/masq", qw(
|
|
|
|
console-save
|
|
|
|
bootstrap-console-save
|
|
|
|
network-create
|
|
|
|
network-delete
|
|
|
|
remoteaccess-update
|
|
|
|
email-update
|
2024-04-04 16:12:24 +02:00
|
|
|
smeserver-packetfilter-update
|
2023-07-12 10:02:33 +02:00
|
|
|
));
|
|
|
|
|
2024-04-04 16:12:24 +02:00
|
|
|
foreach (qw(console-save ip-change network-create network-delete remoteaccess-update smeserver-packetfilter-update))
|
2023-07-12 10:02:33 +02:00
|
|
|
{
|
|
|
|
safe_symlink("reload", "root/etc/e-smith/events/$_/services2adjust/masq");
|
|
|
|
}
|
|
|
|
|
2024-04-04 16:12:24 +02:00
|
|
|
my $event ="smeserver-packetfilter-update";
|
2023-07-12 10:02:33 +02:00
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/ulogd");
|
|
|
|
event_link("systemd-reload", $event, "89");
|
|
|
|
event_link("systemd-default", $event, "88");
|
|
|
|
templates2events("/etc/logrotate.d/ulogd", ($event,qw(post-install post-upgrade bootstrap-console-save)) );
|
|
|
|
|
|
|
|
|
|
|
|
#systemd
|
|
|
|
foreach my $target (qw(multi-user sme-server))
|
|
|
|
{
|
|
|
|
system('mkdir -p root/usr/lib/systemd/system/'.$target.'.target.wants/');
|
|
|
|
|
|
|
|
foreach my $unit (qw(
|
|
|
|
masq.service
|
|
|
|
ulogd.service
|
|
|
|
))
|
|
|
|
{
|
|
|
|
symlink("../$unit",
|
|
|
|
"root/usr/lib/systemd/system/$target.target.wants/$unit")
|
|
|
|
or die "Can't symlink to root/usr/lib/systemd/system/$target.target.wants/$unit: $!";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|