summaryrefslogtreecommitdiff
path: root/misc/wifitoggle
diff options
context:
space:
mode:
authorTimmy Keller <tjk@tjkeller.xyz>2021-10-18 23:09:28 -0500
committerTimmy Keller <tjk@tjkeller.xyz>2021-10-18 23:09:28 -0500
commite7786d9b1904ecd2c9989c3f157df48016b0dd50 (patch)
tree6c05945a22b462556fc4f1612cee2fe778e544fe /misc/wifitoggle
parent2cf3ea2f828f6da07adff92a7dc5bce6069620ab (diff)
downloadscripts-e7786d9b1904ecd2c9989c3f157df48016b0dd50.tar.xz
scripts-e7786d9b1904ecd2c9989c3f157df48016b0dd50.zip
moved some things around
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
-