Protect what matters – even after you're gone. Make a plan for your digital legacy today.
Forum Discussion
Former Member
4 years ago`op run` process doesn't exit when starting process from within a custom shell-script.
I have a script for connecting to my VPN, and use the 1Password CLI to load my password as environment variable into the script like described here: https://developer.1password.com/docs/cli/secrets-environment-variables, and i have aliased my vpn script like described here: https://developer.1password.com/docs/cli/authenticate-clis
My VPN script can basically either:
1. start an openconnect process in the background (connect to the vpn)
2. pkill the openconnect process (disconnect from the vpn)
When i connect i have a problem that the command/process hangs after the vpn-script has exited, and i am connected to the VPN.
If i enable the --no-masking flag to the alias, the process exits properly as expected.
There is no problems exiting the process when i disconnect from my VPN.
I'm wondering if you could have an explanation to what is happening with the --no-masking functionality, and why it would stop the process/command from exiting?
1Password Version: CLI v2.5.1
Extension Version: Not Provided
OS Version: Ubuntu 22.04
Browser:_ Not Provided
2 Replies
- Former Member
Hi, im also sorry for the late reply.
I have aliased a
vpnscript on my linux machine. This script starts a background task (openconnect).It's the
op run -- vpncommand that doesn't exit when thevpn-script exits. If i enable--no-maskingthe command it exits just fine. If my script exits (and hasn't started the openconnect process, fx by adding a--helpflag, theop run -- vpnalso exits fine, even without--no-maskingenabled. - andi_t_1P
1Password Team
Hi @bizzaro, thanks for your question and sorry for the late reply. I have a couple of questions: Could you tell us which op command exactly hangs in your script? What kind of output do you expect this command to have?
All the best,
Andi