--- rpms/smeserver-wireguard/contribs10/smeserver-wireguard-1.0-bz11721-init.patch 2021/10/27 21:35:02 1.1
+++ rpms/smeserver-wireguard/contribs10/smeserver-wireguard-1.0-bz11721-init.patch 2021/10/28 02:50:14 1.4
@@ -10,3 +10,101 @@ diff -Nur --no-dereference smeserver-wir
}
}
+diff -Nur --no-dereference smeserver-wireguard-1.0.old/createlink smeserver-wireguard-1.0/createlink
+--- smeserver-wireguard-1.0.old/createlink 2021-10-25 23:38:29.000000000 -0400
++++ smeserver-wireguard-1.0/createlink 2021-10-27 21:20:46.985000000 -0400
+@@ -69,5 +69,5 @@
+ ));
+
+
+-
++panel_link("wireguard", "manager");
+
+diff -Nur --no-dereference smeserver-wireguard-1.0.old/root/etc/e-smith/db/configuration/migrate/wireguard smeserver-wireguard-1.0/root/etc/e-smith/db/configuration/migrate/wireguard
+--- smeserver-wireguard-1.0.old/root/etc/e-smith/db/configuration/migrate/wireguard 2021-10-27 21:17:33.367000000 -0400
++++ smeserver-wireguard-1.0/root/etc/e-smith/db/configuration/migrate/wireguard 2021-10-27 21:18:24.898000000 -0400
+@@ -6,7 +6,7 @@
+ $DB->set_prop('wg-quick@wg0', 'private', $value ) ;
+ }
+ # recreate public if empty or not the same
+-$private=${'wg-quick@wg0'}{'private'};
++$private=$DB->get_prop('wg-quick@wg0', 'private') ;
+ $public=`/usr/bin/echo $private | /usr/bin/wg pubkey`;
+ chomp $public;
+ if ( ! defined ${'wg-quick@wg0'}{'public'} || ${'wg-quick@wg0'}{'public'} ne $public) {
+diff -Nur --no-dereference smeserver-wireguard-1.0.old/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/70wireguard smeserver-wireguard-1.0/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/70wireguard
+--- smeserver-wireguard-1.0.old/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/70wireguard 1969-12-31 19:00:00.000000000 -0500
++++ smeserver-wireguard-1.0/root/etc/e-smith/templates/etc/systemd/system-preset/49-koozali.preset/70wireguard 2021-06-28 03:17:15.000000000 -0400
+@@ -0,0 +1,12 @@
++# wireguard specific configuration
++{
++$wg = $wireguard{status} || 'disabled';
++$wg0 = ${'wg-quick@wg0'}{status} || 'disabled';
++if ($wg0 eq 'enabled') {
++ $OUT .= "enable wg-quick\@wg0.service\n";
++} else {
++ $OUT .= "disable wg-quick\@wg0.service\n";
++}
++
++}
++
+diff -Nur --no-dereference smeserver-wireguard-1.0.old/root/etc/e-smith/templates/etc/systemd/system-preset/70wireguard smeserver-wireguard-1.0/root/etc/e-smith/templates/etc/systemd/system-preset/70wireguard
+--- smeserver-wireguard-1.0.old/root/etc/e-smith/templates/etc/systemd/system-preset/70wireguard 2021-06-28 03:17:15.000000000 -0400
++++ smeserver-wireguard-1.0/root/etc/e-smith/templates/etc/systemd/system-preset/70wireguard 1969-12-31 19:00:00.000000000 -0500
+@@ -1,12 +0,0 @@
+-# wireguard specific configuration
+-{
+-$wg = $wireguard{status} || 'disabled';
+-$wg0 = ${'wg-quick@wg0'}{status} || 'disabled';
+-if ($wg0 eq 'enabled') {
+- $OUT .= "enable wg-quick\@wg0.service\n";
+-} else {
+- $OUT .= "disable wg-quick\@wg0.service\n";
+-}
+-
+-}
+-
+diff -Nur --no-dereference smeserver-wireguard-1.0.old/createlink smeserver-wireguard-1.0/createlink
+--- smeserver-wireguard-1.0.old/createlink 2021-10-27 21:37:41.284000000 -0400
++++ smeserver-wireguard-1.0/createlink 2021-10-27 21:38:21.164000000 -0400
+@@ -33,7 +33,7 @@
+ ));
+ event_services($event, qw(
+ masq restart
+- 'wg-quick@wg0' restart
++ wg-quick@wg0 restart
+ ));
+ event_link("wireguard-network", $event, "30");
+
+@@ -44,7 +44,7 @@
+ /etc/wireguard/server_public.key
+ ));
+ event_services($event, qw(
+- 'wg-quick@wg0' restart
++ wg-quick@wg0 restart
+ ));
+
+ #wireguard-user-create
+@@ -65,7 +65,7 @@
+ /etc/wireguard/server_public.key
+ ));
+ event_services($event, qw(
+- 'wg-quick@wg0' restart
++ wg-quick@wg0 restart
+ ));
+
+
+diff -Nur --no-dereference smeserver-wireguard-1.0.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/wireguard smeserver-wireguard-1.0/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/wireguard
+--- smeserver-wireguard-1.0.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/wireguard 2021-10-26 23:15:11.000000000 -0400
++++ smeserver-wireguard-1.0/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/wireguard 2021-10-27 21:41:45.296000000 -0400
+@@ -239,6 +239,10 @@
+ You can not alter the server ip, mask, private and public key as there are already some clients configured.
+
+
++
++ NO_CONF
++ No configured client
++
+
+
+