fix to get password macos seqoia
This commit is contained in:
parent
fd38c8b47d
commit
a757d917b4
10
bibVPN.sh
10
bibVPN.sh
@ -131,7 +131,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# A command that will result in your VPN password.
|
# A command that will result in your VPN password.
|
||||||
GET_VPN_PASSWORD="security find-generic-password -g -a $VPN_USERNAME 2>&1 >/dev/null | cut -d'\"' -f2"
|
GET_VPN_PASSWORD="security find-generic-password -w -l openconnect -a $VPN_USERNAME 2>&1"
|
||||||
# Command to determine if VPN is connected or disconnected
|
# Command to determine if VPN is connected or disconnected
|
||||||
VPN_CONNECTED="ifconfig | egrep -A1 '$NET_FILTER' |cut -d' ' -f2"
|
VPN_CONNECTED="ifconfig | egrep -A1 '$NET_FILTER' |cut -d' ' -f2"
|
||||||
# Command to run to disconnect VPN
|
# Command to run to disconnect VPN
|
||||||
@ -269,7 +269,13 @@ if [ -f $OC_PIDFILE ]; then
|
|||||||
aUser=$(ps -ef | grep -e '--user\ ' | cut -d' ' -f 32)
|
aUser=$(ps -ef | grep -e '--user\ ' | cut -d' ' -f 32)
|
||||||
if [[ $aUser =~ .*@.* ]]; then echo "User: $aUser" ; fi
|
if [[ $aUser =~ .*@.* ]]; then echo "User: $aUser" ; fi
|
||||||
echo "IP: $IP"
|
echo "IP: $IP"
|
||||||
echo "Verbunden seit: $(stat $OC_PIDFILE | cut -d'"' -f4)"
|
pidTime=$(stat $OC_PIDFILE | cut -d'"' -f4)
|
||||||
|
|
||||||
|
|
||||||
|
startZeit=$(date -j -f "%b %d %H:%M:%S %Y" "$pidTime" +%s)
|
||||||
|
now=$(date +%s)
|
||||||
|
seitZeit="$(( (now-startZeit) ))"
|
||||||
|
echo "Verbunden seit: $pidTime ($seitZeit Sek ~ $(( seitZeit/60 )) Min) "
|
||||||
showSettings
|
showSettings
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user