From e7786d9b1904ecd2c9989c3f157df48016b0dd50 Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Mon, 18 Oct 2021 23:09:28 -0500 Subject: moved some things around --- misc/wifitoggle | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100755 misc/wifitoggle (limited to 'misc/wifitoggle') 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 - -- cgit v1.2.3