diff options
| -rw-r--r-- | README.md | 3 | ||||
| -rw-r--r-- | wireguardmeshgenerator.rb | 2 |
2 files changed, 3 insertions, 2 deletions
@@ -42,13 +42,12 @@ END [root@r0 ~] dnf update -y [root@r0 ~] reboot -[root@r0 ~] firewall-cmd --add-port=51820/udp --permanent -[root@r0 ~] firewall-cmd --reload [root@r0 ~] dnf install wireguard-tools [root@r0 ~] mkdir -p /etc/wireguard [root@r0 ~] touch /etc/wireguard/wg0.conf [root@r0 ~] systemctl enable wg-quick@wg0.service [root@r0 ~] systemctl start wg-quick@wg0.service +[root@r0 ~] systemctl disable firewalld [root@r0 ~] cat <<END >>/etc/hosts 192.168.1.130 f0 f0.lan f0.lan.buetow.org diff --git a/wireguardmeshgenerator.rb b/wireguardmeshgenerator.rb index c7badd4..aee7d81 100644 --- a/wireguardmeshgenerator.rb +++ b/wireguardmeshgenerator.rb @@ -153,7 +153,9 @@ InstallConfig = Struct.new(:myself, :hosts) do #!/bin/sh set -x #{cmd} + rm $0 SH + File.delete('cmd.sh') if File.exist?('cmd.sh') Net::SSH.start(@myself, @ssh_user) do |ssh| output = ssh.exec!('sh cmd.sh') raise output unless output.exitstatus.zero? |
