summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorstkhan <personal@slickd.xyz>2021-05-05 12:47:50 -0500
committerstkhan <personal@slickd.xyz>2021-05-05 12:47:50 -0500
commit210acbc3e92993865bbd4f9c02d09248e5718204 (patch)
tree4000c13e983219aee7de41c4726b1c659eabb649 /bin
parent77ffe60043cb7edd754413da6b1a797b4d2369d6 (diff)
Rewrote ns script
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brighter2
-rwxr-xr-xbin/ns35
2 files changed, 32 insertions, 5 deletions
diff --git a/bin/brighter b/bin/brighter
index b495a84..1dd5452 100755
--- a/bin/brighter
+++ b/bin/brighter
@@ -1,4 +1,4 @@
#!/bin/sh
-sudo light -A 6
+sudo light -A 3
diff --git a/bin/ns b/bin/ns
index 70b10a2..170afcd 100755
--- a/bin/ns
+++ b/bin/ns
@@ -1,5 +1,32 @@
-#!/bin/sh
-# A simple script that starts wifi with wpa_supplicant and dhcpcd
+#!/usr/bin/bash
+source /etc/ns.conf
+
+case $1 in
+
+ -k)
+
+ killall wpa_supplicant
+ killall dhcpcd
+ ;;
+ -r)
+ killall wpa_supplicant
+ killall dhcpcd
+
+ wpa_supplicant -c $CONFIG -B -i $INTERFACE
+ dhcpcd $INTERFACE
+ echo "Done"
+ ;;
+ -s)
+ wpa_supplicant -c $CONFIG -B -i $INTERFACE
+ dhcpcd $INTERFACE
+ ;;
+ *)
+ echo "ns"
+ echo
+ echo " -s: Starts the wifi"
+ echo " -r: Restarts wpa_supplicant and dhcpcd"
+ echo " -k: Kills the network"
+ echo
+ ;;
+esac
-wpa_supplicant -c/etc/wpa_supplicant.conf -B -i$1
-dhcpcd $1