Minor changes to awips_install.sh to fix backup of old awips2.repo and backup AWIPS directories

This commit is contained in:
Tiffany Meyer 2021-06-11 17:18:21 -04:00
parent 084ec50a84
commit e6cf575d7a

View file

@ -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"