Add su command to logrotate and remove chown command in postinstall.sh

This commit is contained in:
Théophile Diot 2024-02-19 09:39:45 +01:00
parent 822fa7db6b
commit 768252cc19
No known key found for this signature in database
GPG key ID: 248FEA4BAE400D06
2 changed files with 2 additions and 2 deletions

View file

@ -1,12 +1,13 @@
/var/log/bunkerweb/*.log
{
su nginx nginx
daily
rotate 7
copytruncate
compress
delaycompress
missingok
notifempty
dateext
dateformat -%Y-%m-%d
create 0640 root nginx
}

View file

@ -18,7 +18,6 @@ function do_and_check_cmd() {
# Give all the permissions to the nginx user
echo "Setting ownership for all necessary directories to nginx user and group..."
do_and_check_cmd chown -R nginx:nginx /usr/share/bunkerweb /var/cache/bunkerweb /var/lib/bunkerweb /etc/bunkerweb /var/tmp/bunkerweb /var/run/bunkerweb /var/log/bunkerweb
do_and_check_cmd chown root:root /var/log/bunkerweb
# Stop and disable nginx on boot
echo "Stop and disable nginx on boot..."