From e6cf575d7a1156cc7c2f3127f7c0c8135013dab9 Mon Sep 17 00:00:00 2001 From: Tiffany Meyer Date: Fri, 11 Jun 2021 17:18:21 -0400 Subject: [PATCH] Minor changes to awips_install.sh to fix backup of old awips2.repo and backup AWIPS directories --- awips_install.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/awips_install.sh b/awips_install.sh index 990ea29d7d..0316efb10e 100755 --- a/awips_install.sh +++ b/awips_install.sh @@ -29,7 +29,7 @@ function check_yumfile { echo "You need to be running CentOS7 or RedHat7" exit fi - if [ ! -f /etc/yum.repos.d/awips2.repo ]; then + if [ -f /etc/yum.repos.d/awips2.repo ]; then date=$(date +%Y%m%d-%H:%M%:S) cp /etc/yum.repos.d/awips2.repo /etc/yum.repos.d/awips2.repo-${date} fi @@ -150,10 +150,13 @@ function remove_edex { rsync -aP /awips2/database/data/pg_hba.conf $backup_dir/ rsync -aP /awips2/edex/data/utility $backup_dir/ - rsync -aP /awips2/edex/bin/ $backup_dir/ + rsync -aP /awips2/edex/bin $backup_dir/ rsync -aP /awips2/ldm $backup_dir/ - rsync -aP /awips2/edex/conf $backup_dir - rsync -aP /awips2/edex/etc $backup_dir + rsync -aP /awips2/edex/conf $backup_dir/ + rsync -aP /awips2/edex/etc $backup_dir/ + rsync -aP /usr/bin/edex $backup_dir/ + rsync -aP /etc/init.d/edexServiceList $backup_dir/init.d/ + rsync -aP /etc/spool/cron/awips $backup_dir/ if [[ $(rpm -qa | grep awips2-cave) ]]; then echo "CAVE is also installed, now removing EDEX and CAVE"