Update openvpn.init

This commit is contained in:
MarkusMcNugen 2018-02-04 00:38:22 -05:00 committed by GitHub
parent 268ef9164d
commit ec17e733ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,7 +39,6 @@ if test -e /etc/default/openvpn ; then
fi fi
start_vpn () { start_vpn () {
OPENVPNLOG="/config/openvpn/$NAME.log"
if grep -q '^[ ]*daemon' $CONFIG_DIR/$NAME.ovpn ; then if grep -q '^[ ]*daemon' $CONFIG_DIR/$NAME.ovpn ; then
# daemon already given in config file # daemon already given in config file
@ -91,7 +90,7 @@ start_vpn () {
--pidfile /run/openvpn/$NAME.pid \ --pidfile /run/openvpn/$NAME.pid \
--exec $DAEMON -- $OPTARGS --writepid /run/openvpn/$NAME.pid \ --exec $DAEMON -- $OPTARGS --writepid /run/openvpn/$NAME.pid \
$DAEMONARG $STATUSARG --cd $CONFIG_DIR \ $DAEMONARG $STATUSARG --cd $CONFIG_DIR \
--config $CONFIG_DIR/$NAME.ovpn $script_security >> $OPENVPNLOG 2>&1 < /dev/null || STATUS=1 --config $CONFIG_DIR/$NAME.ovpn $script_security < /dev/null || STATUS=1
[ "$OMIT_SENDSIGS" -ne 1 ] || ln -s /run/openvpn/$NAME.pid /run/sendsigs.omit.d/openvpn.$NAME.pid [ "$OMIT_SENDSIGS" -ne 1 ] || ln -s /run/openvpn/$NAME.pid /run/sendsigs.omit.d/openvpn.$NAME.pid