macOS tools moving to my git

This commit is contained in:
2026-05-10 12:53:30 -07:00
parent 61c0d4b5f1
commit 83156ea9e8
101 changed files with 3011 additions and 0 deletions

45
vpn-toggle Executable file
View File

@@ -0,0 +1,45 @@
#!/bin/bash
DEFAULT_VPN_NAME="AlgoVPN algo3"
export PATH=$PATH:/usr/bin/local
VPN_NAME=$1
if [[ $VPN_NAME = "" ]];
then
VPN_NAME=$DEFAULT_VPN_NAME
fi
curStatus=$( /usr/sbin/networksetup -showpppoestatus "${VPN_NAME}" )
dtst=`date +"%Y%m%d-%H.%M"`
echo ""
echo "Script:"
echo "vpn flip for ${VPN_NAME}"
echo "------------------------------------------------------------------------"
echo "Machine:" $cname
/usr/bin/sw_vers
sysctl kern.version
sysctl kern.ostype
sysctl kern.osrelease
sysctl kern.osrevision
echo ""
if [[ $curStatus = "disconnected" ]];
then
echo "Currently disconnected, connecting..."
/usr/sbin/networksetup -connectpppoeservice "${VPN_NAME}"
else
echo "Currently connected, disconnecting..."
/usr/sbin/networksetup -disconnectpppoeservice "${VPN_NAME}"
fi