Skip to content
http://www.sparklabs.com/support/kb/art ... osity-mac/
Cheers,
James
Viscosity 1.7.3 JAMF Casper automated upgrade troubles
Got a problem with Viscosity or need help? Ask here!
Hi Guys,
I was wondering if I could get some assistance with programmatically uninstalling and reinstalling Viscosity, or if possible, what it is that the "helpertool" prompt actually installs, so I can replicate appropriately.
I manage an estate of macs and want to bulk update the app, and settings as I can no longer assume users will do this correctly. I am therefore doing the following:
1) force an update of the application (curl command to download and hdutil to unpack and copy)
2) force through our VPN config connections (visc files being pushed are tested and working as should)
3) force through our license, some basic settings and update preferences (and where I believe Im falling over - privileged helper)
I use Casper to manage the macs, so use Composer to capture 2 and 3 and script 1 through a bash script)
Im currently getting mixed results when I uninstall various older versions ranging from 1.6 > 1.7.1 and push the new app, settings and helpertool.
I'll either get the installer helper prompt (even though Ive captured the helper file inside /Library/PriviledgedHelpers, checked its perms and tested) and this check will crash rendering Viscosity useless and have to reinstall manually.
If it does install, connecting to the pushed VPN entries causes a perpetual connect/reconnect or just doesn't connect stating that "Your VPN connection has been disconnected" even though it never connected. Ive had limited success with removing the viscosity/Openvpn1/2 entries from keychain, but this isn't feasible if fixing en mass.
Attached is the script Im using which makes use of instructions for uninstalling from here:
http://www.sparklabs.com/support/kb/art ... osity-mac/
I was wondering if I could get some assistance with programmatically uninstalling and reinstalling Viscosity, or if possible, what it is that the "helpertool" prompt actually installs, so I can replicate appropriately.
I manage an estate of macs and want to bulk update the app, and settings as I can no longer assume users will do this correctly. I am therefore doing the following:
1) force an update of the application (curl command to download and hdutil to unpack and copy)
2) force through our VPN config connections (visc files being pushed are tested and working as should)
3) force through our license, some basic settings and update preferences (and where I believe Im falling over - privileged helper)
I use Casper to manage the macs, so use Composer to capture 2 and 3 and script 1 through a bash script)
Im currently getting mixed results when I uninstall various older versions ranging from 1.6 > 1.7.1 and push the new app, settings and helpertool.
I'll either get the installer helper prompt (even though Ive captured the helper file inside /Library/PriviledgedHelpers, checked its perms and tested) and this check will crash rendering Viscosity useless and have to reinstall manually.
If it does install, connecting to the pushed VPN entries causes a perpetual connect/reconnect or just doesn't connect stating that "Your VPN connection has been disconnected" even though it never connected. Ive had limited success with removing the viscosity/Openvpn1/2 entries from keychain, but this isn't feasible if fixing en mass.
Attached is the script Im using which makes use of instructions for uninstalling from here:
http://www.sparklabs.com/support/kb/art ... osity-mac/
Code: Select all
Cheers#!/bin/bash
##############################`
# MODIFIABLE
##############################
VERSION=$4
DMG_NAME="Viscosity.dmg"
APPNAME="Viscosity.app"
VIS_LINK="https://www.sparklabs.com/downloads/${DMG_NAME}"
FOLDER="viscosity"
APP_PATH="/Applications/$APPNAME"
##############################
# Constants to compute
##############################
if [ -d $APP_PATH ]
then
osascript -e 'tell application “Viscosity” to disconnectall'
sleep 2
sudo pkill -3 Viscosity
launchctl unload "/Library/LaunchDaemons/com.sparklabs.ViscosityHelper.plist"
rm "/Library/PrivilegedHelperTools/com.sparklabs.ViscosityHelper"
rm "/Library/LaunchDaemons/com.sparklabs.ViscosityHelper.plist"
rm -R "/Library/Application Support/Viscosity"
echo "$APP_PATH present - deleting"
rm -rf $APP_PATH
defaults delete com.viscosityvpn.Viscosity
fi
mkdir /private/tmp/"$FOLDER"
cd /private/tmp/"$FOLDER"
curl -L -O "$VIS_LINK"
hdiutil mount -nobrowse "${DMG_NAME}"
cp -R "/Volumes/Viscosity/${APPNAME}" /Applications
hdiutil unmount "/Volumes/Viscosity"
rm -R /private/tmp/"$FOLDER"
Hi rodders,
macOS has a number of security protections around helper tools, so simply copying things into place won't work. Instead once the Viscosity application has been copied into place you can run the following command as root to install/upgrade the helper tool:
http://www.sparklabs.com/support/kb/art ... envpn-log/
Cheers,
James
macOS has a number of security protections around helper tools, so simply copying things into place won't work. Instead once the Viscosity application has been copied into place you can run the following command as root to install/upgrade the helper tool:
Code: Select all
In regards to why a connection is unable to connect after upgrading, more information should be available in the OpenVPN log for the connection:/Applications/Viscosity.app/Contents/MacOS/Viscosity -installHelperTool YES
http://www.sparklabs.com/support/kb/art ... envpn-log/
Cheers,
James
Web: https://www.sparklabs.com
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs
Hi James,
Thanks for getting back to me.
I'll test out the line you gave me and get back to you.
As for the logs, the connection doesnt even establish - I have reports that people are click the connection, and it just instantly notifies with the popup of disconnecting
Would it be worth running:
Thanks for getting back to me.
I'll test out the line you gave me and get back to you.
As for the logs, the connection doesnt even establish - I have reports that people are click the connection, and it just instantly notifies with the popup of disconnecting
Would it be worth running:
Code: Select all
During the removal stages as I currently only do:
Your Home Folder/Library/Application Support/Viscosity
Code: Select all
rm -R "/Library/Application Support/Viscosity"
As for the logs, the connection doesnt even establish - I have reports that people are click the connection, and it just instantly notifies with the popup of disconnectingInformation should still be available in the OpenVPN log why this is the case.
During the removal stages as I currently only doIf removing Viscosity all the steps listed in the following guide should be followed to ensure that no clashes are left behind:
http://www.sparklabs.com/support/kb/art ... osity-mac/
Cheers,
James
Web: https://www.sparklabs.com
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs
4 posts
Page 1 of 1