mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
openvpn: import from base
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions/openvpn.sh
|
||||
|
||||
[ -e "/etc/openvpn.user" ] && {
|
||||
env -i ACTION="$ACTION" INSTANCE="$INSTANCE" \
|
||||
/bin/sh \
|
||||
/etc/openvpn.user \
|
||||
$*
|
||||
}
|
||||
|
||||
# Wrap user defined scripts on up/down events
|
||||
case "$ACTION" in
|
||||
up|down)
|
||||
if get_openvpn_option "$config" command "$ACTION"; then
|
||||
shift
|
||||
exec /bin/sh -c "$command $*"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This file is interpreted as shell script.
|
||||
# Put your custom openvpn action here, they will
|
||||
# be executed with each opevnp event.
|
||||
#
|
||||
# $ACTION
|
||||
# <down> down action is generated after the TUN/TAP device is closed
|
||||
# <up> up action is generated after the TUN/TAP device is opened
|
||||
# $INSTANCE Name of the openvpn instance which went up or down
|
||||
|
||||
Reference in New Issue
Block a user