Remove old bundled connections?

Got a problem with Viscosity or need help? Ask here!

Bryan

Posts: 6
Joined: Wed Apr 12, 2023 5:58 am

Post by Bryan » Wed Apr 12, 2023 6:03 am
Hello,

I'm building a new bundle for a bunch of users and my new connections have different names than the existing ones. Is there a way to remove those old connections during installation of this new bundle?

Thanks

James

User avatar
Posts: 2313
Joined: Thu Sep 04, 2008 9:27 pm

Post by James » Wed Apr 12, 2023 5:47 pm
Hi Bryan,

The bundled installer templates don't directly support deleting connections, however you can remove the connections yourself using a script. If this is a managed machine you can simply run it directly prior to deploying your updated Viscosity bundle. It can be as simple as something like "rm -Rf ~/Library/Application\ Support/Viscosity/OpenVPN" (without the quotes), which will remove all connections for the user it is run under.

If you'd like to integrate the script with a bundled installer, something like so should work:

1. Save your script. Ensure it contains a #! header and runs correctly.
2. Edit the Viscosity Installer.pkgproj template in Packages
3. Right click on the Viscosity package to the left and select duplicate.
4. Go to the Scripts tab on your duplicated copy.
5. Clear both Pre-installation and Post-Installation scripts, and remove the Preconfigure folder from the Additional Resources section.
6. Select your own script under Pre-installation.
7. Build the package.

Cheers,
James
Web: https://www.sparklabs.com
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs

Bryan

Posts: 6
Joined: Wed Apr 12, 2023 5:58 am

Post by Bryan » Thu Apr 20, 2023 1:36 am
Thanks, James. I'll try the bundled script.
3 posts Page 1 of 1