SparkLabs Forum.

Community Help.


openvpn ipchange script not executing?

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!
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
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

Copyright © 2016 SparkLabs Pty Ltd. All Rights Reserved. Privacy Policy