diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 20291ea1..c34c58c8 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -140,8 +140,10 @@ LISTCERTS(){ BACKUP(){ BACKUP_FOLDER=/opt/idssys/backups/node-backups/${NODE_HOSTNAME} #/`date +%Y-%m-%d` #BACKUP_TIMEFOLDER=${BACKUP_DAYFOLDER}/`date +%H-%M` - echo -e "${idsCL[Green]}Backing up Node Settings and Files...${idsCL[Default]}" - DIVIDER true + if [ "${action}" != "backup" ]; then + echo -e "${idsCL[Green]}Backing up Node Settings and Files...${idsCL[Default]}" + DIVIDER true + fi if [ ! -d ${BACKUP_FOLDER} ]; then mkdir -p ${BACKUP_FOLDER} fi @@ -153,14 +155,19 @@ BACKUP(){ #BACKUP_ITEMS[webserver-files]=/var/www for item in "${!BACKUP_ITEMS[@]}" do - echo -en "Backing up '${item}'... " + if [ "${action}" != "backup" ]; then + echo -en "Backing up '${item}'... " + fi #tar -czPf ${BACKUP_FOLDER}/${item}.tar.gz -C ${BACKUP_ITEMS[$item]} . tar -czPf ${BACKUP_FOLDER}/${item}.tar.gz -g ${BACKUP_FOLDER}/backup.snar -C ${BACKUP_ITEMS[$item]} . --exclude='./data/repository' --exclude='*/.stfolder' --exclude='*/.stversions' --exclude='*/.git' - echo -e "${idsCL[Green]}Ok${idsCL[Default]}" + if [ "${action}" != "backup" ]; then + echo -e "${idsCL[Green]}Ok${idsCL[Default]}" + fi done - - echo "" - DIVIDER true + if [ "${action}" != "backup" ]; then + echo "" + DIVIDER true + fi if [ -z $action ] || [ "${action}" = "gui" ]; then ENTER2CONTINUE fi