[Unit] Description=WireGuard on %I After=network-online.target nss-lookup.target Wants=network-online.target nss-lookup.target [Service] Type=oneshot User=root RemainAfterExit=yes ExecStart=/bin/systemctl restart wg-quick@%I.service ExecStop=/bin/systemctl stop wg-quick@%I.service [Install] WantedBy=multi-user.target