chmod the log directory to prevent 666 permissions

This commit is contained in:
Salamandar 2022-04-15 12:03:38 +02:00
parent 5de02bcc15
commit 9c8c7a0d51

View file

@ -90,6 +90,7 @@ $logfile {
EOF
# Create the log directory, if not exist
mkdir --parents $(dirname "$logfile")
chmod 644 $(dirname "$logfile")
# Append this config to the existing config file, or replace the whole config file (depending on $customtee)
cat ${app}-logrotate | $customtee /etc/logrotate.d/$app >/dev/null
chmod 644 /etc/logrotate.d/$app