summaryrefslogtreecommitdiff
path: root/misc/wifitoggle
diff options
context:
space:
mode:
Diffstat (limited to 'misc/wifitoggle')
-rwxr-xr-xmisc/wifitoggle34
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
-