File tree Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 3131 certbot \
3232 openssl \
3333 apache2-utils \
34+ logrotate \
3435 && \
36+ # Adjust the logrotate config file.
37+ sed-patch 's|^/var/log/messages|#/var/log/messages|' /etc/logrotate.conf && \
3538 # Clean some uneeded stuff from mariadb.
3639 rm -r \
3740 /var/lib/mysql \
Original file line number Diff line number Diff line change 1+ /config/log/nginx/*.log {
2+ daily
3+ compress
4+ rotate 14
5+ missingok
6+ notifempty
7+ nocreate
8+ nodateext
9+ size 1024k
10+ sharedscripts
11+ postrotate
12+ test ! -f /run/nginx/nginx.pid || kill -USR1 `cat /run/nginx/nginx.pid`
13+ endscript
14+ }
Original file line number Diff line number Diff line change 1+ #! /usr/bin/with-contenv sh
2+
3+ set -e # Exit immediately if a command exits with a non-zero status.
4+
5+ # Make sure we appear with a proper name under `ps`.
6+ if [ ! -L " $0 " ]; then
7+ SV_NAME=" $( basename " $( pwd) " ) "
8+ ln -sf run " $SV_NAME "
9+ exec ./" $SV_NAME " " $@ "
10+ fi
11+
12+ log () {
13+ echo " [$( basename " $0 " ) ] $* "
14+ }
15+
16+ log " starting..."
17+ while true ; do
18+ s6-applyuidgid -u $USER_ID -g $GROUP_ID -G ${SUP_GROUP_IDS:- $GROUP_ID } /usr/sbin/logrotate -s /config/logrotate.status /etc/logrotate.conf
19+ EXITVALUE=$?
20+ if [ $EXITVALUE != 0 ]; then
21+ log " exited abnormally with [$EXITVALUE ]"
22+ fi
23+ sleep 3600
24+ done
25+
26+ # vim:ft=sh:ts=4:sw=4:et:sts=4
You can’t perform that action at this time.
0 commit comments