From e2869cfe4215cc27f2c04ebf8cd26ee1abbd36dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 1 Aug 2017 01:52:09 +0200 Subject: add netset --- netset | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 netset diff --git a/netset b/netset new file mode 100755 index 0000000..b1627c2 --- /dev/null +++ b/netset @@ -0,0 +1,20 @@ +#! /bin/bash + +NETCTL=$(which netctl) +if [ -z "$NETCTL" ] +then + echo "netctl not found" + exit 1 +fi +if [ $UID -ne 0 ] +then + echo "must be run as root" + exit 1 +fi +$NETCTL stop-all +PROFILES=$($NETCTL list) +select profile in $PROFILES +do + [ -z "$profile" ] && exit 0 + echo "starting profile $profile" && $NETCTL start $profile; break +done -- cgit v1.1-2-g2b99