-if [[ -e /etc/wireguard/wghole.conf ]]; then
- reload=false
- if [[ ! -e /etc/systemd/system/wg-quick@wghole.service.d/override.conf ]]; then
- reload=true
- fi
- sudo mkdir -p /etc/systemd/system/wg-quick@wghole.service.d
- sd /etc/systemd/system/wg-quick@wghole.service.d/override.conf <<'EOF'
-[Unit]
-StartLimitIntervalSec=0
-
-[Service]
-Restart=on-failure
-RestartSec=20
-EOF
- if $reload; then ser daemon-reload; fi
- sgo wg-quick@wghole
-fi