V
V
vlarkanov2019-04-15 12:33:49
linux
vlarkanov, 2019-04-15 12:33:49

Why is the script not executed when connecting OpenVPN on OrangePi (Ubuntu 16.04.6 LTS)?

Hello! There is OrangePi, it is necessary to execute the script after raising OpenVPN. The interface is called tun0.
Wrote this script:

#!/bin/sh
#put this script into /etc/network/if-up.d
if [ "$IFACE" = tun0 ]; then
echo $(date) >> /usr/local/bin/update.log;
fi

put on the path /etc/network/if-up.d/tun0updatedyn.sh, made it executable.
After restarting OpenVPN rises as always, the script is not executed. The path /usr/local/bin/update.log exists, is writable (especially since the scripts from if-up.d are supposed to be executed as root).
What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Ronald McDonald, 2019-04-15
@Zoominger

The /etc/network/if-up.d/ and /etc/network/if-down.d/ scripts are called only by the ifup and ifdown commands. Check if the line will appear if you first turn off the VPN, and then raise it.

I
Ivan Koryukov, 2017-02-21
@MadridianFox

Somewhere there is a redirect from www to without www, here it is in a circle and redirects. The browser noticed this and threw an error.

M
Maxim Timofeev, 2017-02-21
@webinar

www.wpbeginner.com/wp-tutorials/how-to-fix-error-t...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question