openvpn ipchange script not executing?

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

djw77

Posts: 2
Joined: Sun Dec 25, 2016 1:38 pm

Post by djw77 » Sun Dec 25, 2016 1:48 pm
Hi,

I can't seem to get an openvpn ipchange script to work in Viscosity 1.6.7 on macOS 10.12.2, not sure what I'm doing wrong, but the log always shows:
Dec 24 20:37:10: WARNING: Failed running command (--ipchange): external program exited with error status: 1
The relevant part of the (advanced) config is:
ipchange /usr/local/bin/vpn-ipchange.sh
script-security 2
I've tried placing the script alongside the configs in ~/Library/Application Support, /usr/local, my home directory, etc., various permissions (755 and 700) and owners (root and my uid), and just can't seem to get anything to run. Not even if I change it to /usr/bin/env or similar. What could I be missing?

I'd really like to have access to the interface name and the ip ($dev and $ifconfig_local), which don't seem to be as easily available in applescript.

Thanks for any help!

James

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

Post by James » Tue Jan 03, 2017 9:00 am
Hi djw77,

An exit status of 1 means that the script was found and was attempted to be executed, but the script encountered a problem. This means there is a problem in the script. For shell/bash scripts it typically means there is a syntax error or another process it invokes could not be run. You may like to attempt some debugging, such as writing log messages to a file from the script to see where it's encountering a problem.

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

djw77

Posts: 2
Joined: Sun Dec 25, 2016 1:38 pm

Post by djw77 » Tue Jan 03, 2017 12:04 pm
Indeed, /usr/bin/true works, I guess I was too deep in the weeds trying to get something to work. Looks like the environment passed to ipchange is nowhere near as complete as the up script, and that was my issue. Thanks!
3 posts Page 1 of 1