Skip to content

Commit

Permalink
curve prefix
Browse files Browse the repository at this point in the history
Signed-off-by: Liao PengFei <[email protected]>
  • Loading branch information
hdbdn77 committed Nov 29, 2023
1 parent 3c28c56 commit b4985ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions playbook/logs/scripts/log_retention.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ retention_log() {
continue
fi

if [ -e "/etc/logrotate.d/$dir_path_name" ];then
if [ -e "/etc/logrotate.d/curve-$dir_path_name" ];then
continue
fi

Expand Down Expand Up @@ -111,13 +111,13 @@ retention_log() {
logrotate_config+="}\n"

# Write logrotate configuration to file
echo -e "$logrotate_config" > "/etc/logrotate.d/$dir_path_name"
echo -e "$logrotate_config" > "/etc/logrotate.d/curve-$dir_path_name"

logrotate -d /etc/logrotate.conf 2>&1 | grep -i 'error:'
if [ $? -eq 0 ]; then
die "Logrotate configuration file error.\n"
else
success "Logrotate configuration generated and written to '$dir_path_name' file.\n"
success "Logrotate configuration generated and written to 'curve-$dir_path_name' file.\n"
fi
done

Expand Down

0 comments on commit b4985ba

Please sign in to comment.