improve wireguard robustness
This commit is contained in:
parent
e9e78db60a
commit
3a19f133a7
1 changed files with 4 additions and 5 deletions
|
|
@ -140,12 +140,11 @@ apt-get install -y wireguard wireguard-tools
|
||||||
|
|
||||||
echo "Enabling Wireguard service..."
|
echo "Enabling Wireguard service..."
|
||||||
systemctl enable wg-quick@wg0
|
systemctl enable wg-quick@wg0
|
||||||
systemctl start wg-quick@wg0
|
|
||||||
|
|
||||||
echo "Wireguard setup complete!"
|
|
||||||
wg show
|
|
||||||
|
|
||||||
|
echo "Wireguard installation complete!"
|
||||||
rm /root/setup-wireguard.sh
|
rm /root/setup-wireguard.sh
|
||||||
|
|
||||||
|
systemctl start wg-quick@wg0 || true
|
||||||
SETUP_SCRIPT
|
SETUP_SCRIPT
|
||||||
sudo chmod +x /mnt/rpi-root/root/setup-wireguard.sh
|
sudo chmod +x /mnt/rpi-root/root/setup-wireguard.sh
|
||||||
|
|
||||||
|
|
@ -155,12 +154,12 @@ sudo tee /mnt/rpi-root/etc/systemd/system/wireguard-first-boot.service > /dev/nu
|
||||||
Description=Setup Wireguard on first boot
|
Description=Setup Wireguard on first boot
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
Before=wg-quick@wg0.service
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/root/setup-wireguard.sh
|
ExecStart=/root/setup-wireguard.sh
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
|
TimeoutStartSec=300
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue