diff options
author | Mark Nipper <nipsy@bitgnome.net> | 2024-10-15 11:21:12 -0700 |
---|---|---|
committer | Mark Nipper <nipsy@bitgnome.net> | 2024-10-15 11:21:12 -0700 |
commit | a6b37147a883ce45a409921b0cc86087d85f2145 (patch) | |
tree | 2c6dd19dc0653e35e13d211da0b9ce8519254987 /home/root | |
parent | c12d847ebfeaf5260cc9dfeba40dece9fdca1768 (diff) | |
download | nix-a6b37147a883ce45a409921b0cc86087d85f2145.tar nix-a6b37147a883ce45a409921b0cc86087d85f2145.tar.gz nix-a6b37147a883ce45a409921b0cc86087d85f2145.tar.bz2 nix-a6b37147a883ce45a409921b0cc86087d85f2145.tar.lz nix-a6b37147a883ce45a409921b0cc86087d85f2145.tar.xz nix-a6b37147a883ce45a409921b0cc86087d85f2145.tar.zst nix-a6b37147a883ce45a409921b0cc86087d85f2145.zip |
Fix VPN script
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 |