initial commit of file from CVS for smeserver-wireguard on Sat Sep 7 16:45:37 AEST 2024

This commit is contained in:
Trevor Batley
2024-09-07 16:45:37 +10:00
parent 224708b82c
commit b7eed5fe86
69 changed files with 9053 additions and 2 deletions

84
additional/createlink Normal file
View File

@@ -0,0 +1,84 @@
#!/usr/bin/perl -w
use esmith::Build::CreateLinks qw(:all);
my $event="smeserver-wireguard-update";
event_templates($event, qw(
/etc/wireguard/wg0.conf
/etc/wireguard/server_public.key
/etc/rc.d/init.d/masq
));
# for smeserver-manager
safe_symlink('restart', "root/etc/e-smith/events/$event/services2adjust/smanager");
event_link('navigation2-conf', "$event", '80');
event_link('routes2-conf', "$event", '80');
event_link('locales2-conf', "$event", '80');
# server_public.key will expand server_private.key to keep sync
#TODO
# restart masq or reload ??
# restart wg-quick@wg0
event_services($event, qw(
masq restart
wg-quick@wg0 restart
));
event_link("wireguard-network", $event, "04");
templates2events("/etc/systemd/system-preset/49-koozali.preset", $event);
event_link("systemd-reload", $event, "89");
event_link("systemd-default", $event, "88");
#wireguard-conf-modify
$event="wireguard-conf-modify";
event_templates($event, qw(
/etc/wireguard/wg0.conf
/etc/wireguard/server_public.key
/etc/rc.d/init.d/masq
));
event_services($event, qw(
masq restart
wg-quick@wg0 restart
));
event_link("wireguard-network", $event, "04");
#wireguard-user-modify
$event="wireguard-user-modify";
event_templates($event, qw(
/etc/wireguard/wg0.conf
/etc/wireguard/server_public.key
));
event_services($event, qw(
wg-quick@wg0 restart
));
#wireguard-user-create
$event="wireguard-user-create";
event_templates($event, qw(
/etc/wireguard/wg0.conf
/etc/wireguard/server_public.key
));
event_services($event, qw(
wg-quick@wg0 restart
));
event_link("wireguard-user-create", $event, "03");
#wireguard-user-delete
$event="wireguard-user-delete";
event_templates($event, qw(
/etc/wireguard/wg0.conf
/etc/wireguard/server_public.key
));
event_services($event, qw(
wg-quick@wg0 restart
));
$event="remoteaccess-update";
event_services($event, qw(
wg-quick@wg0 restart
));
panel_link("wireguard", "manager");

View File

@@ -0,0 +1,23 @@
#!/usr/bin/perl -w
use esmith::Build::CreateLinks qw(:all);
panel_link("webhosting", "manager");
for my $event (qw(
webhosting-modify smeserver-webhosting-update
))
{
#we can avoid those 2 as we are tricking ourself as ibay-modify and it will do those and php
#templates2events("/etc/httpd/conf/httpd.conf", $event);
#safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
event_link("webhosting-php-expand", $event, "05");
event_link("webhosting-php-adjust", $event, "90");
}
$event="smeserver-webhosting-update";
event_link("navigation-conf", $event, "70");
# for smeserver-manager
safe_symlink('restart', "root/etc/e-smith/events/$event/services2adjust/smanager");
event_link('navigation2-conf', "$event", '80');
event_link('routes2-conf', "$event", '80');
event_link('locales2-conf', "$event", '80');