From 475e5e83a892b614b04fdeb3f5d58fc3c3f54787 Mon Sep 17 00:00:00 2001 From: Eric Loyd Date: Thu, 13 Jan 2022 10:04:07 -0500 Subject: [PATCH] Use rsync instead of cp to copy header files --- failover/failover.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/failover/failover.sh b/failover/failover.sh index bf01c9e..5ce88b6 100755 --- a/failover/failover.sh +++ b/failover/failover.sh @@ -18,7 +18,7 @@ secondary="" synconly="false" syncname="sync" extraCmd="" -cssDir="/usr/local/nagiosxi/html/includes/components/custom-includes/css/" +cssDir="/usr/local/nagiosxi/html/includes/components/custom-includes/css" hostname=`/bin/hostname` @@ -73,7 +73,7 @@ do_primary() { # Update header.css with proper gradient files if [ -r "${cssDir}/header.css.primary" -a -w "${cssDir}/header.css" ]; then verbose "Copying local gradient files" - cp ${cssDir}/header.css.primary ${cssDir}/header.css + rsync ${cssDir}/header.css.primary ${cssDir}/header.css fi } @@ -96,7 +96,7 @@ do_secondary() { # Update header.css with proper gradient files if [ -r "${cssDir}/header.css.secondary" -a -w "${cssDir}/header.css" ]; then verbose "Copying local gradient files" - cp ${cssDir}/header.css.secondary ${cssDir}/header.css + rsync ${cssDir}/header.css.secondary ${cssDir}/header.css fi verbose "Ensuring that xi.key file has proper permissions" chmod 0640 /usr/local/nagiosxi/var/keys/xi.key