From 5ed81c554e799ff457784cddcfa1871f43fe0147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20A=CC=81lvaro?= Date: Fri, 8 Sep 2023 13:11:01 +0200 Subject: [PATCH] fix: Change salt's logrotate config file --- assets/runtime/functions.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/assets/runtime/functions.sh b/assets/runtime/functions.sh index b04c789..b907883 100755 --- a/assets/runtime/functions.sh +++ b/assets/runtime/functions.sh @@ -556,8 +556,11 @@ function initialize_datadir() function configure_logrotate() { log_info "Configuring logrotate ..." + local LOGROTATE_CONFIG_DIR='/etc/logrotate.d/salt' + local LOGROTATE_CONFIG_FILE="${LOGROTATE_CONFIG_DIR}/salt-common.logrotate" - rm -f /etc/logrotate.d/salt-common + rm -rf "${LOGROTATE_CONFIG_DIR}" + mkdir -p "${LOGROTATE_CONFIG_DIR}" # configure supervisord log rotation cat > /etc/logrotate.d/supervisord < /etc/logrotate.d/salt < "${LOGROTATE_CONFIG_FILE}" <> /etc/logrotate.d/salt <> "${LOGROTATE_CONFIG_FILE}" <