mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
Merge pull request #1362 from MichaIng/patch-1
Fix errors on logging configuration
This commit is contained in:
commit
090642fd7d
1 changed files with 5 additions and 2 deletions
|
@ -2151,6 +2151,9 @@ confNetwork(){
|
||||||
}
|
}
|
||||||
|
|
||||||
confLogging() {
|
confLogging() {
|
||||||
|
# Pre-create rsyslog/logrotate config directories if missing, to assure logs are handled as expected when those are installed at a later time
|
||||||
|
$SUDO mkdir -p etc/{rsyslog,logrotate}.d
|
||||||
|
|
||||||
echo "if \$programname == 'ovpn-server' then /var/log/openvpn.log
|
echo "if \$programname == 'ovpn-server' then /var/log/openvpn.log
|
||||||
if \$programname == 'ovpn-server' then stop" | $SUDO tee /etc/rsyslog.d/30-openvpn.conf > /dev/null
|
if \$programname == 'ovpn-server' then stop" | $SUDO tee /etc/rsyslog.d/30-openvpn.conf > /dev/null
|
||||||
|
|
||||||
|
@ -2171,7 +2174,7 @@ if \$programname == 'ovpn-server' then stop" | $SUDO tee /etc/rsyslog.d/30-openv
|
||||||
# Restart the logging service
|
# Restart the logging service
|
||||||
case ${PLAT} in
|
case ${PLAT} in
|
||||||
Debian|Raspbian|Ubuntu)
|
Debian|Raspbian|Ubuntu)
|
||||||
$SUDO systemctl restart rsyslog.service || true
|
$SUDO systemctl -q is-active rsyslog.service && $SUDO systemctl restart rsyslog.service
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue