This commit is contained in:
2025-06-03 20:53:49 -05:00
parent e31e7fdf83
commit b7bf5f5209
4 changed files with 12 additions and 12 deletions

View File

@@ -22,8 +22,8 @@ SINGLE_SERVER_SERVICE_CHECK(){
[ "${stc}" = "pdnsadmin" ] && stc="pdnsadmin.service pdnsadmin.socket"
for nip in "${!hosts}"; do
if [[ "${RUN_NODE_IP}" != *"${nip}"* ]] && [ "$(CHECK_HOST ${nip})" != "false" ]; then
ssh -tq -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${nip} 'systemctl is-active --quiet '${stc}' && /bin/systemctl stop '${stc} >/dev/null 2>&1
ssh -tq -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${nip} '[ -f '${NM_TMPFOLDER}'/.singleserver.'${1^^}'.primary ] && rm -f '${NM_TMPFOLDER}'/.singleserver.'${1^^}'.primary' >/dev/null 2>&1
${SSHCMD} root@${nip} 'systemctl is-active --quiet '${stc}' && /bin/systemctl stop '${stc} >/dev/null 2>&1
${SSHCMD} root@${nip} '[ -f '${NM_TMPFOLDER}'/.singleserver.'${1^^}'.primary ] && rm -f '${NM_TMPFOLDER}'/.singleserver.'${1^^}'.primary' >/dev/null 2>&1
fi
done
done