From 5d120950fe693616b75feb569701eedef3b84f56 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 1 Jan 2023 09:18:56 -0600 Subject: [PATCH] update folder --- nodemgmt-scripts.sh | 10 +++++----- run.sh | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index dddeb3ff..b787a780 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -2215,10 +2215,10 @@ VCENTER-SSL(){ echo } ADD_LOGROTATE_CRONTAB(){ - if ! crontab -l | grep -q '/opt/idssys/nodemgmt/tmp-logrotate'; then - (crontab -l ; echo "0 */1 * * * logrotate -f /opt/idssys/nodemgmt/tmp-logrotate")| crontab - + if ! crontab -l | grep -q "${FOLDER}/tmp-logrotate"; then + (crontab -l ; echo "0 */1 * * * logrotate -f ${FOLDER}/tmp-logrotate")| crontab - fi - /bin/chmod 0644 /opt/idssys/nodemgmt/tmp-logrotate + /bin/chmod 0644 ${FOLDER}/tmp-logrotate echo "" echo -e "${idsCL[Green]}The crontab entry has been made${idsCL[Default]}" echo "" @@ -2295,7 +2295,7 @@ DOWNLIST(){ idsST=('') fi declare -i cw; declare -i spc1; declare -i c - DOWN_LIST=`find /opt/idssys/nodemgmt -name "*.down"` + DOWN_LIST=`find ${FOLDER} -name "*.down"` if [ -z $action ] || [ "${action}" = "gui" ]; then DIVIDER true @@ -2421,7 +2421,7 @@ if [ ${action-x} ]; then backup) BACKUP;; downlist) if [ "${2}" = "report" ]; then - if [ -f /opt/idssys/nodemgmt/*.down ]; then + if [ -f ${FOLDER}/*.down ]; then rm -f ${FOLDER}/status-downlist.lastrun DOWNLIST report >> ${FOLDER}/status-downlist.lastrun STATUSLOG="$(cat ${FOLDER}/status-$downlist.lastrun)" diff --git a/run.sh b/run.sh index df15cd2b..e28c6d26 100755 --- a/run.sh +++ b/run.sh @@ -35,7 +35,7 @@ if [[ "${noheader}" != *" ${1} "* ]] && [[ "${noheader}" != *" ${2} "* ]]; then git pull >/dev/null 2>&1 git submodule update --remote >/dev/null 2>&1 fi - cd /opt/idssys/nodemgmt + cd ${FOLDER} if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then if [ "${2}" != "q" ]; then echo -en "\e[1A"; @@ -59,5 +59,5 @@ if [[ "${noheader}" != *" ${1} "* ]] && [[ "${noheader}" != *" ${2} "* ]]; then fi fi fi -/opt/idssys/nodemgmt/nodemgmt-scripts.sh ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14} +${SCRIPT} ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14} exit 0