Suppress cp: not replacing

Signed-off-by: Eric Nemchik <eric@nemchik.com>
This commit is contained in:
Eric Nemchik 2023-06-01 19:09:13 -05:00
parent 60f6fafc53
commit 5255b117f9
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View File

@ -30,12 +30,12 @@ if [[ "${VALIDATION}" = "dns" ]] && [[ ! "${DNSPLUGIN}" =~ ^(acmedns|aliyun|azur
fi
# copy dns default configs
cp -n /defaults/dns-conf/* /config/dns-conf/
cp -n /defaults/dns-conf/* /config/dns-conf/ 2> >(grep -v 'cp: not replacing')
lsiown -R abc:abc /config/dns-conf
# copy default renewal hooks
chmod -R +x /defaults/etc/letsencrypt/renewal-hooks
cp -nR /defaults/etc/letsencrypt/renewal-hooks/* /config/etc/letsencrypt/renewal-hooks/
cp -nR /defaults/etc/letsencrypt/renewal-hooks/* /config/etc/letsencrypt/renewal-hooks/ 2> >(grep -v 'cp: not replacing')
lsiown -R abc:abc /config/etc/letsencrypt/renewal-hooks
# replace nginx service location in renewal hooks

View File

@ -15,7 +15,7 @@ if [[ ! -f /config/crontabs/root ]]; then
# if crontabs still do not exist in config (were not copied from system)
# copy crontab from included defaults (using -n, do not overwrite an existing file)
cp -n /etc/crontabs/root /config/crontabs/
cp -n /etc/crontabs/root /config/crontabs/ 2> >(grep -v 'cp: not replacing')
fi
# set permissions and import user crontabs
lsiown root:root /config/crontabs/root
@ -31,7 +31,7 @@ if [[ ! -f /config/crontabs/abc ]]; then
# if crontabs still do not exist in config (were not copied from system)
# copy crontab from included defaults (using -n, do not overwrite an existing file)
cp -n /etc/crontabs/abc /config/crontabs/
cp -n /etc/crontabs/abc /config/crontabs/ 2> >(grep -v 'cp: not replacing')
fi
# set permissions and import user crontabs
lsiown abc:abc /config/crontabs/abc