This commit is contained in:
Salamandar 2022-05-26 19:09:16 +09:00 committed by GitHub
commit 1abecdd79a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -88,8 +88,12 @@ $logfile {
$su_directive
}
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)
# 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
}
# Remove the app's logrotate config.