Posted on 08-18-2021 08:36 AM
I was wondering how do you guys upgrade the cisco anyconnect VPN Client ? as we are all working from home , we need upgrade them remotely and we need to upgrade user VPN Session is not active.
if you are aware of any process or any script can you please let me know
Thanks
santosh
Posted on 08-18-2021 09:18 AM
We just had to do this in our org. Luckily, I already had a script ready which:
Here it is:
#!/bin/bash
# Written by Steve Summers
# ifconfig is searching for a connection to the VPN. If a device
# is connected, the IP variable will contain the IP address. If a device is not
# connected, it does not return anything.
# You'll need to input the first 2 octets of your institutions IP range when a
# device is connected.
IP=$(ifconfig | grep -E '(ip\.range)' -A 3 -B 1)
# This is a simple test condition, the -z tests for a "ZERO" in the IP variable
# If the customer is on the vpn, IP will not be zero and the script will end
# If the customer is NOT on the vpn, the condition is true, and the script runs
# the removal of the old and installs the new.
if [[ -z $IP ]]; then
echo "VPN Not Connected, uninstalling old and installing new version..."
# this calls the silent uninstaller. we don't use the one in applications
sudo /opt/cisco/anyconnect/bin/umbrella_uninstall.sh
sleep 20
sudo /opt/cisco/anyconnect/bin/anyconnect_uninstall.sh
sleep 30
# policy to install the new VPN
sudo jamf policy -id <your Policy ID here>
sleep 180
else
echo "VPN Connected, exiting..."
exit 1
fi
IP=$(ifconfig | grep -E '(ip\.range)' -A 3 -B 1)
Posted on 08-18-2021 09:39 AM
I used app_quitter.py that goes based on if the bundle identifier for the app is open and it worked well for me
https://github.com/t-lark/Auto-Update/blob/master/app_quitter.py
Posted on 08-18-2021 09:47 AM
Wow. That's pretty nice. Is it customizable with a company logo and stuff?
Posted on 08-18-2021 09:48 AM
Yes, it is! It is calling Jamf Helper, which is customizable. I just point it to a company logo that I drop locally on the machine
Posted on 08-18-2021 09:54 AM
thats awesome @ljcacioppo @stex ..thanks a lot for your help .. i will test it in my LAB first before moving it to production.
If i understand correctly i have to deploy appquitter.py script and call the uninstall & Install application with the same script
Posted on 08-18-2021 10:32 AM
I just ran the script via a jamf policy. You can use parameters to specify which bundle ID, if you want it to force quit, the policy to the updated version it is calling for the install of, etc. Here's what the parameters looked like for me Also, Here's the wiki which has some more explanation: https://github.com/t-lark/Auto-Update/wiki/Implementation.
I just modified the verbiage in the script for what it was going to say to users in the prompt boxes
And I didn't even uninstall the old version of AnyConnect. I deployed the new one right over the top
Posted on 08-19-2021 01:01 PM
I just recently started using the new Title Editor to build my own Patch Management titles. I built one for AnyConnect and used that.
Posted on 07-21-2023 04:48 AM
can you maybe share that title or json file of cisco any connect please?