Skip to content

Commit

Permalink
seafile logrotate
Browse files Browse the repository at this point in the history
  • Loading branch information
SkywalkerSpace committed Dec 2, 2021
1 parent e6352f9 commit 580020c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docker/scripts/enterpoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@ fi

# logrotate
if [[ -f /var/spool/cron/crontabs/root ]]; then
/usr/bin/crontab -l >> /scripts/logrotate-conf/logrotate-cron
cat /scripts/logrotate-conf/logrotate-cron >> /var/spool/cron/crontabs/root
else
chmod 0644 /scripts/logrotate-conf/logrotate-cron
/usr/bin/crontab /scripts/logrotate-conf/logrotate-cron
fi
chmod 0644 /scripts/logrotate-conf/logrotate-cron
/usr/bin/crontab /scripts/logrotate-conf/logrotate-cron


# autorun
Expand Down
5 changes: 5 additions & 0 deletions docker/scripts/logrotate-conf/seatable-thumbnail
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/opt/seatable-thumbnail/logs/seafile.log
/opt/seatable-thumbnail/logs/seatable-thumbnail.log
{
daily
Expand All @@ -11,6 +12,10 @@
create 644 root root
sharedscripts
postrotate
if [ -f /opt/seatable-thumbnail/pids/seafile.pid ]; then
kill -USR1 `cat /opt/seatable-thumbnail/pids/seafile.pid`
fi

/scripts/logrotate-conf/seatable-thumbnail-restart.sh
endscript
}

0 comments on commit 580020c

Please sign in to comment.