This commit is contained in:
2023-11-25 22:03:28 -06:00
parent b8da839afb
commit 4af22bcffb
4 changed files with 21 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
VERS='4.16.1-11252023'
VERS='4.16.5-11252023'
noheader=' service status-check nightlyrephp7.3-fpm,new backup report check checkcerts gitea update-nodes copynpmcerts singleservercheck update-dyndns backup-offsitepfsense gui nightlyreview update log '
CERT_DAEMON='/snap/bin/certbot'

View File

@@ -167,7 +167,7 @@ SERVICE_MGMT(){
nip='localhost '
NCMD=''
else
NCMD="ssh root@${nip}"
NCMD="ssh -o ConnectTimeout=3 root@${nip}"
fi
[ ${QUIET} -eq 0 ] && echo -en "${NM_SRVCOPTS[${SERVICE['action']}]}ing on '$nip'... ${idsCL[Default]}"
@@ -201,7 +201,7 @@ SERVICE_MGMT(){
nip='localhost '
NCMD=''
else
NCMD="ssh root@${nip}"
NCMD="ssh -o ConnectTimeout=3 root@${nip}"
fi
if [ ${QUIET} -eq 0 ]; then
@@ -359,7 +359,7 @@ SERVICE_MGMT(){
nip='localhost '
NCMD=''
else
NCMD="ssh root@${nip}"
NCMD="ssh -o ConnectTimeout=3 root@${nip}"
fi
NOGOCHK=true;
@@ -469,7 +469,7 @@ CHECK_DOCKER_SERVICES(){
for nip in "${!hosts}"; do
if [[ ${RUN_NODE_IP} == *"${nip}"* ]]; then NCMD=''; LH='- localhost'
else NCMD="ssh root@${nip}"; LH=''
else NCMD="ssh -o ConnectTimeout=3 root@${nip}"; LH=''
fi
if [ "${NCMD}" != "" ]; then
checkhost=$(CHECK_HOST ${nip})

View File

@@ -235,7 +235,7 @@ STATUS(){
mysqlgo=true
fi
else
if [ "$(ssh root@${nip} ps -U root | grep "offsite-power-check.sh start" | grep -v "grep" | awk '{print $1}')" != "" ]; then
if [ "$(ssh -o ConnectTimeout=3 root@${nip} ps -U root | grep "offsite-power-check.sh start" | grep -v "grep" | awk '{print $1}')" != "" ]; then
srvctest=active
else
srvctest=notactive
@@ -661,7 +661,7 @@ It was down for $(SHOW_TIME ${toterrtime})"
var=${NTYPE}_HOSTS[@]
for nip in "${!var}"; do
if [[ $"{RNIP}" == *"${nip}"* ]]; then NCMD=''; LH='- localhost'
else NCMD="ssh root@${nip}"; LH=''
else NCMD="ssh -o ConnectTimeout=3 root@${nip}"; LH=''
fi
if [ "${ST_ACTION}" != "check" ]; then
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]} [${nip}]${idsST[Reset]}${idsCL[LightCyan]} ${idsCL[LightYellow]}${LH}${idsCL[Default]}"
@@ -670,7 +670,7 @@ It was down for $(SHOW_TIME ${toterrtime})"
[ "${ST_ACTION}" != "check" ] && [ "${2}" != "report" ] && echo -en " ${idsCL[LightCyan]}Getting drives from server ... ${idsCL[Default]}"
declare -A partitions
DRIVEINFO=$(ssh root@${nip} df -BM | grep -vE '^Filesystem|tmpfs|cdrom|@|ram|loop|udev|veeamimage|nvme|localhost|shm|mmcblk|overlay|-volume|Music|Software' | awk '{ print $1 " " $2 " " $4 }')
DRIVEINFO=$(ssh -o ConnectTimeout=3 root@${nip} df -BM | grep -vE '^Filesystem|tmpfs|cdrom|@|ram|loop|udev|veeamimage|nvme|localhost|shm|mmcblk|overlay|-volume|Music|Software' | awk '{ print $1 " " $2 " " $4 }')
DRIVEINFO=(${DRIVEINFO})
if [ "${2}" != "report" ]; then
echo -en "\e[1A"
@@ -792,9 +792,9 @@ REPLCHECK(){
checked=false
until [ "${checked}" == "" ]; do
if [ "${PH_CMD}" == "" ]; then
ssh -q root@${nip} [[ -f ${NM_REPL_CHECK_LOC[${rcheck}]}/test.repl ]] && checked=`ssh root@${nip} "cat ${NM_REPL_CHECK_LOC[${rcheck}]}/test.repl" | diff - ${NM_REPL_CHECK_LOC[${rcheck}]}/test.repl`
ssh -q root@${nip} [[ -f ${NM_REPL_CHECK_LOC[${rcheck}]}/test.repl ]] && checked=`ssh -o ConnectTimeout=3 root@${nip} "cat ${NM_REPL_CHECK_LOC[${rcheck}]}/test.repl" | diff - ${NM_REPL_CHECK_LOC[${rcheck}]}/test.repl`
else
ssh -q root@${nip} [[ -f ${NM_REPL_CHECK_LOC[${rcheck}]}/test.repl ]] && checked="`${PH_CMD} \"ssh root@${nip} \"cat ${NM_REPL_CHECK_LOC[${rcheck}]}/test.repl\" | diff - ${NM_REPL_CHECK_LOC[${rcheck}]}/test.repl\"`"
ssh -q root@${nip} [[ -f ${NM_REPL_CHECK_LOC[${rcheck}]}/test.repl ]] && checked="`${PH_CMD} \"ssh -o ConnectTimeout=3 root@${nip} \"cat ${NM_REPL_CHECK_LOC[${rcheck}]}/test.repl\" | diff - ${NM_REPL_CHECK_LOC[${rcheck}]}/test.repl\"`"
fi
[ "`date +%s`" -gt "${timeout}" ] && timeout=true && break
done

View File

@@ -60,7 +60,7 @@ SET-PERMISSIONS(){
if [[ ${RUN_NODE_IP} == *"${nip}"* ]]; then
NCMD=''
else
NCMD="ssh root@${nip}"
NCMD="ssh -o ConnectTimeout=3 root@${nip}"
fi
if [ "${2}" != "q" ]; then
echo -en "${idsCL[Yellow]}Resetting folder permissions for Gitea on ${NM_HOSTNAMES[${nip}]} (${nip})... ${idsCL[Default]}"
@@ -85,7 +85,7 @@ SET-PERMISSIONS(){
if [[ ${RUN_NODE_IP} == *"${nip}"* ]]; then
NCMD=''
else
NCMD="ssh root@${nip}"
NCMD="ssh -o ConnectTimeout=3 root@${nip}"
fi
if [ "${2}" != "q" ]; then
echo -en "${idsCL[Yellow]}Resetting folder permissions for PowerDNS-Admin on ${NM_HOSTNAMES[${nip}]} (${nip})... ${idsCL[Default]}"
@@ -107,7 +107,7 @@ SET-PERMISSIONS(){
if [[ ${RUN_NODE_IP} == *"${nip}"* ]]; then
NCMD=''
else
NCMD="ssh root@${nip}"
NCMD="ssh -o ConnectTimeout=3 root@${nip}"
fi
if [ "${2}" != "q" ]; then
echo -en "${idsCL[Yellow]}Resetting folder permissions for Nextcloud on ${NM_HOSTNAMES[${nip}]} (${nip})... ${idsCL[Default]}"
@@ -138,7 +138,7 @@ SET-PERMISSIONS(){
nip='localhost '
NCMD=''
else
NCMD="ssh root@${nip}"
NCMD="ssh -o ConnectTimeout=3 root@${nip}"
fi
echo -e "${idsCL[Yellow]}Setting folder permissions for ${NM_HOSTNAMES[${nip}]} (${nip})${idsCL[Default]}"
echo -en "${idsCL[Cyan]}LetsEncrypt Certs ${idsCL[Default]}"
@@ -159,7 +159,7 @@ SET-PERMISSIONS(){
nip='localhost '
NCMD=''
else
NCMD="ssh root@${nip}"
NCMD="ssh -o ConnectTimeout=3 root@${nip}"
fi
if [ "${NEW_SITE}" != "" ]; then
echo -en "${idsCL[Cyan]}${NM_HOSTNAMES[${nip}]} (${nip}) ${idsCL[Default]}"
@@ -205,7 +205,7 @@ HAPROXY-CONFIG() {
nip='localhost '
NCMD=''
else
NCMD="ssh root@${nip}"
NCMD="ssh -o ConnectTimeout=3 root@${nip}"
fi
echo -en "Creating File on ${NM_HOSTNAMES[${nip}]} ($nip)... ${idsCL[Default]}"
@@ -226,7 +226,7 @@ HAPROXY-CONFIG() {
nip='localhost '
NCMD=''
else
NCMD="ssh root@${nip}"
NCMD="ssh -o ConnectTimeout=3 root@${nip}"
fi
echo -en "Creating File on ${NM_HOSTNAMES[${nip}]} ($nip)... ${idsCL[Default]}"
@@ -246,7 +246,7 @@ HAPROXY-CONFIG() {
nip='localhost '
NCMD=''
else
NCMD="ssh root@${nip}"
NCMD="ssh -o ConnectTimeout=3 root@${nip}"
fi
echo -en "Creating File on ${NM_HOSTNAMES[${nip}]} ($nip)... ${idsCL[Default]}"
@@ -276,7 +276,7 @@ KEEPALIVE-CONFIG() {
nip='localhost '
NCMD=''
else
NCMD="ssh root@${nip}"
NCMD="ssh -o ConnectTimeout=3 root@${nip}"
fi
echo -en "Creating File on ${NM_HOSTNAMES[${nip}]} ($nip)... ${idsCL[Default]}"
@@ -297,7 +297,7 @@ KEEPALIVE-CONFIG() {
nip='localhost '
NCMD=''
else
NCMD="ssh root@${nip}"
NCMD="ssh -o ConnectTimeout=3 root@${nip}"
fi
echo -en "Creating File on ${NM_HOSTNAMES[${nip}]} ($nip)... ${idsCL[Default]}"
@@ -589,7 +589,7 @@ RUN_COMMAND(){
var=${NTYPE}_HOSTS[@]
for nip in "${!var}"; do
if [[ ${RUN_NODE_IP} == *"${nip}"* ]]; then NCMD=''; LH='- localhost'
else NCMD="ssh root@${nip}"; LH=''
else NCMD="ssh -o ConnectTimeout=3 root@${nip}"; LH=''
fi
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]}[${nip}]${idsST[Reset]}${idsCL[LightCyan]} ${idsCL[LightYellow]}${LH}${idsCL[Default]}"
DIVIDER false green