Update openvpn.init

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

View File

@ -39,7 +39,7 @@ if test -e /etc/default/openvpn ; then
fi fi
start_vpn () { start_vpn () {
OPENVPNLOG="/var/log/openvpn.log" 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 +91,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 >> $QBTLOG 2>&1 < /dev/null || STATUS=1 --config $CONFIG_DIR/$NAME.ovpn $script_security >> $OPENVPNLOG 2>&1 < /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