diff options
author | Timmy Keller <tjk@tjkeller.xyz> | 2021-10-18 23:09:28 -0500 |
---|---|---|
committer | Timmy Keller <tjk@tjkeller.xyz> | 2021-10-18 23:09:28 -0500 |
commit | e7786d9b1904ecd2c9989c3f157df48016b0dd50 (patch) | |
tree | 6c05945a22b462556fc4f1612cee2fe778e544fe /misc/wifitoggle | |
parent | 2cf3ea2f828f6da07adff92a7dc5bce6069620ab (diff) | |
download | scripts-e7786d9b1904ecd2c9989c3f157df48016b0dd50.tar.xz scripts-e7786d9b1904ecd2c9989c3f157df48016b0dd50.zip |
moved some things around
Diffstat (limited to 'misc/wifitoggle')
-rwxr-xr-x | misc/wifitoggle | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/misc/wifitoggle b/misc/wifitoggle deleted file mode 100755 index 4c74da4..0000000 --- a/misc/wifitoggle +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -printusage() { echo "Usage: $0 [up|on|down|off|toggle]" && exit; } -if [ "$COMPUTER" = "laptop" ]; then - down() { - doas sv stop dhcpcd sshd rsyncd - } - up() { - doas sv start dhcpcd sshd rsyncd - } - toggle() { - case `doas sv status dhcpcd | cut -d':' -f1` in - run) down ;; - down) up ;; - *) echo "Error: sv returned an invalid string. Is dhcpcd being used on this system? Is runit the init system?" ;; - esac - } -elif [ "$COMPUTER" = "desktop" ]; then - down() { - echo hi; - } - up() { - echo hi; - } -fi - -[ -z "$1" ] && toggle && exit - -case "$1" in - up|on) up ;; - down|off) down ;; - toggle) toggle ;; - *) printusage ;; -esac - |