Context :
We're using Pritunl as VPN. It's a pain for everyone to log in 1Password (our password manager), search for their VPN credentials, and type them in to connect to Pritunl.I use a simple script which links the VPN profile to the credentials in 1password ("op" is 1password's cli).
In use, I just have to click on the .command, it executes and open a popup for touchID (used to access 1password's content), gets the credentials with the name "vpn-companyname" and connect to Pritunl with this info.
What would you recommend to do to deploy it to all the employees through jamf ?
I tried to package it with Jamf composer, but Composer keeps the absolute path /Users/myusername/Desktop/VPNshortcut.command and creates it on the laptops I push the policy/package to... Which creates a new directory/user, so it's a bit of a mess
Also tried to use Shortcuts on Mac, but it's not possible to share it without iCloud etc
Ideally, the script (or the app, if I manage to make it look like one) would be automatically put in the dock, and execute just like any program with one click
Important : From what I've tried, it's important that the script runs as executed by the current user in session, as if it's not the case 1Password's touchID popup doesn't show up (probably due to a security measure)
I'd appreciate any help on the subject
Thanks in advance !
open -a Pritunl
/Applications/Pritunl.app/Contents/Resources/pritunl-client start $(/Applications/Pritunl.app/Contents/Resources/pritunl-client list | grep "vpn-companyname" | awk '{print $2}') --password "$(op item get vpn-companyname --fields password)$(op item get --otp vpn-companyname)"
