feat(packaging): rotate storage-server log files on alpine
arcad/edge/pipeline/head This commit looks good Details

This commit is contained in:
wpetit 2023-11-30 19:54:00 +01:00
parent 32f04af138
commit d9e8aac458
3 changed files with 17 additions and 1 deletions

View File

@ -108,10 +108,17 @@ nfpms:
file_info:
mode: 0640
packager: apk
- src: misc/packaging/openrc/storage-server.logrotate.conf
dst: /etc/logrotate.d/storage-server
packager: apk
- dst: /var/lib/storage-server
type: dir
file_info:
mode: 0700
packager: apk
- dst: /var/log/storage-server
type: dir
file_info:
mode: 0700
scripts:
postinstall: "misc/packaging/common/postinstall-storage-server.sh"

View File

@ -0,0 +1,9 @@
/var/log/storage-server/storage-server.log {
missingok
sharedscripts
compress
rotate 7
postrotate
/etc/init.d/storage-server restart
endscript
}

View File

@ -3,7 +3,7 @@
command="/usr/bin/storage-server"
command_args="run"
supervisor=supervise-daemon
output_log="/var/log/storage-server.log"
output_log="/var/log/storage-server/storage-server.log"
error_log="$output_log"
depend() {