Summary
Connecting to Shrew soft vpn
- terminal -- command works fine
- bash script -- same command returns error:
"double free or corruption (out)"
Problem
I often connect to my work vpn using the shrewsoft vpn client. I'd like to create a bash script so that I can use a single command to set up the vpn client, as well as a few other environment variables. When I run the command from the terminal, it works fine. But the same command in a bash scrip fails.
Terminal Command
ikec -r "<shrewsoft vpn connection name>" -u "john" -p "<password>" -a
Bash Script
#! bash
ikec -r "<shrewsoft vpn connection name>" -u "john" -p "<password>" -a
and then in the terminal I'm running the command:
> sudo bash ./vpn_connection.sh
I've already started "sudo /usr/sbin/iked". From the terminal, I can connect and disconnect successfully running that command, but when I run it from the bash script, I get an error.