mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-20 20:00:16 +00:00
- Clarified text about disabling logging on the server.
- Modified the expressions that replace the logfile locations in the server configuration.
This commit is contained in:
parent
3981e119f6
commit
7b74d7dc02
1 changed files with 4 additions and 5 deletions
|
@ -799,7 +799,7 @@ setClientDNS() {
|
||||||
setLoggingPolicy() {
|
setLoggingPolicy() {
|
||||||
CONLOGLOC="/var/log/openvpn.log"
|
CONLOGLOC="/var/log/openvpn.log"
|
||||||
STATUSLOGLOC="/var/log/openvpn-status.log"
|
STATUSLOGLOC="/var/log/openvpn-status.log"
|
||||||
if (whiptail --backtitle "Logging policy" --title "Disable logging" --yesno --defaultno "Do you want to disable logging of connection information?" ${r} ${c}) then
|
if (whiptail --backtitle "Logging policy" --title "Disable logging" --yesno --defaultno "Do you want to disable logging on the server (e.g. redirect log output to /dev/null)?" ${r} ${c}) then
|
||||||
CONLOGLOC="/dev/null"
|
CONLOGLOC="/dev/null"
|
||||||
STATUSLOGLOC="/dev/null"
|
STATUSLOGLOC="/dev/null"
|
||||||
fi
|
fi
|
||||||
|
@ -912,13 +912,12 @@ EOF
|
||||||
$SUDO sed -i "s/1194/${PORT}/g" /etc/openvpn/server.conf
|
$SUDO sed -i "s/1194/${PORT}/g" /etc/openvpn/server.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TODO: Test these expressions
|
# if they modified logfile locations put values in server.conf
|
||||||
# if they modified logging policy put values in server.conf
|
|
||||||
if [ $CONLOGLOC != "/var/log/openvpn.log" ]; then
|
if [ $CONLOGLOC != "/var/log/openvpn.log" ]; then
|
||||||
$SUDO sed -i "s/(\/var\/log\/openvpn.log)/${CONLOGLOC}/g" /etc/openvpn/server.conf
|
$SUDO sed -i "s#/var/log/openvpn.log#${CONLOGLOC}#g" /etc/openvpn/server.conf
|
||||||
fi
|
fi
|
||||||
if [ $STATUSLOGLOC != "/var/log/openvpn-status.log" ]; then
|
if [ $STATUSLOGLOC != "/var/log/openvpn-status.log" ]; then
|
||||||
$SUDO sed -i "s/(\/var\/log\/openvpn-status.log)/${CONLOGLOC}/g" /etc/openvpn/server.conf
|
$SUDO sed -i "s#/var/log/openvpn-status.log#${STATUSLOGLOC}#g" /etc/openvpn/server.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if they modified protocol put value in server.conf
|
# if they modified protocol put value in server.conf
|
||||||
|
|
Loading…
Reference in a new issue