From e4e208d3b72df83138fad96c9e0edec21c923fdf Mon Sep 17 00:00:00 2001 From: niusmallnan Date: Fri, 26 Apr 2019 21:11:34 +0800 Subject: [PATCH] Only make an initial copy for the logrotate config files --- images/02-logrotate/usr/bin/entrypoint.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/images/02-logrotate/usr/bin/entrypoint.sh b/images/02-logrotate/usr/bin/entrypoint.sh index 3742e270..081779a0 100755 --- a/images/02-logrotate/usr/bin/entrypoint.sh +++ b/images/02-logrotate/usr/bin/entrypoint.sh @@ -1,5 +1,10 @@ #!/bin/bash -cp /usr/share/logrotate/logrotate.d/* /etc/logrotate.d +for f in /usr/share/logrotate/logrotate.d/*; do + target=/etc/logrotate.d/$(basename ${f}) + if [ ! -e ${target} ]; then + cp ${f} ${target} + fi +done exec /usr/bin/ros entrypoint "$@"