diff options
Diffstat (limited to 'home/root')
-rw-r--r-- | home/root/arrakis.nix | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/home/root/arrakis.nix b/home/root/arrakis.nix index dcb5347..b852ce5 100644 --- a/home/root/arrakis.nix +++ b/home/root/arrakis.nix @@ -8,7 +8,7 @@ "bin/vpnctl" = { executable = true; text = '' - #!/usr/bin/env zsh + #!${pkgs.zsh}/bin/zsh function status_vpn { @@ -37,7 +37,6 @@ function stop_vpn { - #systemctl stop qbittorrent-nox@nipsy.service prowlarr.service ip netns del vpn ip link del veth.host @@ -52,7 +51,6 @@ stop_vpn sleep 2 start_vpn - #systemctl start qbittorrent-nox@nipsy.service prowlarr.service elif [[ "''${1}" == "restart_firewall" ]]; then @@ -60,7 +58,11 @@ elif [[ "''${1}" == "start" ]]; then - start_vpn + if [[ ! -f /run/netns/vpn ]]; then + start_vpn + else + echo 'VPN service already appears to be running' >&2 + fi elif [[ "''${1}" == "stop" ]]; then |