Release file handle by restarting rsyslog service (#2401)

This commit is contained in:
Stephan Oeste 2021-09-16 20:00:45 +02:00 committed by GitHub
parent a13dd67e93
commit a9e2fefba5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -251,6 +251,7 @@ if [ ${logsMegaByte} -gt 1000 ]; then
echo "/var/log/nginx is present"
fi
sudo rm -r /var/log/*
sudo service rsyslog restart
if [ $nginxLog == 1 ]; then
sudo mkdir /var/log/nginx
echo "Recreated /var/log/nginx"