Add logrotate support for *.log files in /run mounts of apps
logrotate config files may contain arbitrary commands which are exectued as root, thus the config files have to be owned by root. This is the reason we need the sudo scripts :-/ To test the generated scripts, just run: $ logrotate /etc/logrotate.conf -v Fixes #396
This commit is contained in:
@@ -17,7 +17,9 @@ scripts=("${SOURCE_DIR}/src/scripts/rmappdir.sh" \
|
||||
"${SOURCE_DIR}/src/scripts/collectlogs.sh" \
|
||||
"${SOURCE_DIR}/src/scripts/reloadcollectd.sh" \
|
||||
"${SOURCE_DIR}/src/scripts/authorized_keys.sh" \
|
||||
"${SOURCE_DIR}/src/scripts/node.sh")
|
||||
"${SOURCE_DIR}/src/scripts/node.sh" \
|
||||
"${SOURCE_DIR}/src/scripts/mvlogrotateconfig.sh" \
|
||||
"${SOURCE_DIR}/src/scripts/rmlogrotateconfig.sh")
|
||||
|
||||
for script in "${scripts[@]}"; do
|
||||
if [[ $(sudo -n "${script}" --check 2>/dev/null) != "OK" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user