OpenVPN shell script on connect error

Hello everyone!
i’m trying to make OpenVPN (latest apply some iptables rules on connect and having errors, “Failed running command: external program exited with error status: 1” and similar.
i have in my optional parameters in vpn config (was surprised that these are not imported from .ovpn file) :
script-security 2
up /data/data/de.blinkt.openvpn/files/

sure, i did chmod +x, chown and chgrp to that shall script to match openvpn app user/group.
it works perfectly from adb shell. in my script there’s a single su -c command, but openvpn did not ask for permissions in LineageOS root management.
btw, i have latest build Lineage 14.1.2, Android 7.1.2.
i even tried up ‘/system/bin/ls /sdcard’, does not work. shows in log correct ls output and quits with error status 1, stopping vpn connection.
tried busybox bash instead of stock sh. same thing.
what am i doing wrong? please, someone, help me!

better post here :slight_smile:

yes, yes. i did.

1 Like