Update logrotate

This commit is contained in:
ericgaspar 2021-10-05 13:02:51 +02:00
parent de4b3825ab
commit ef2a8c8dbd
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -96,6 +96,10 @@ $logfile {
EOF
mkdir --parents $(dirname "$logfile") # Create the log directory, if not exist
cat ${app}-logrotate | $customtee /etc/logrotate.d/$app > /dev/null # Append this config to the existing config file, or replace the whole config file (depending on $customtee)
ynh_user_exists "$app" || chown $app:$app "/var/log/$app"
chmod o-rwx "/var/log/$app"
}
# Remove the app's logrotate config.