From 08f22ad82edbe30606a8145a01ab18f2f6d71b4b Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Sun, 17 Nov 2024 23:39:40 -0600 Subject: delete .old dir since all is still stored in version control --- .old/wgconnect | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100755 .old/wgconnect (limited to '.old/wgconnect') diff --git a/.old/wgconnect b/.old/wgconnect deleted file mode 100755 index de8f307..0000000 --- a/.old/wgconnect +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# Connect to/disconnect from wireguard tunnel using dmenu - -sudo="${SUDO:-sudo}" -pass="$(xsudo --get-pass)" - -ssudo() { echo "$pass" | $sudo $@ ; } - -dmenu_confirm_continue() { - case "$(echo "yes\nno" | dmenu -p "$1")" in - yes) - ;; - *) exit 0 ;; - esac -} - -curtun="$(ssudo wg show | sed 's/interface: //;q')" - -# Ask to disconnect from current interface -if [ -n "$curtun" ]; then - dmenu_confirm_continue "Currently connected to tunnel $curtun. Disconnect?" - - output="$(ssudo wg-quick down "$curtun" 2>&1)" - notify-send "Disconnected from $curtun" "$output" - - dmenu_confirm_continue "Connect to another interface?" -fi - -# Connect to new interface -tundir=/etc/wireguard - -tun="$tundir/$(ssudo ls "$tundir" | grep "\.conf$" | dmenu -p "Connect to which tunnel?")" - -if ! ssudo cat $tun >/dev/null 2>/dev/null; then - notify-send "Couldn't connect to tunnel $tun" - exit 1 -fi - -output="$(ssudo wg-quick up "$tun" 2>&1)" -notify-send "Connected to $tun" "$output" -- cgit v1.2.3