Web-checks now runs in separate thread. Some fixes in scripts.

Web-checks now runs in separate thread. Some fixes in scripts.
This commit is contained in:
2022-11-04 01:07:07 +03:00
parent 87e326e869
commit bf96109742
8 changed files with 145 additions and 80 deletions

View File

@@ -7,6 +7,8 @@ if [[ -z "$APP_PATH" ]] ; then
APP_PATH="/etc/cai-watchdog"
fi
source ${APP_PATH}/inc-icons
RCPT=$1
SERVICE=$2
PROCESS_OR_URI=$3

View File

@@ -7,6 +7,8 @@ if [[ -z "$APP_PATH" ]] ; then
APP_PATH="/etc/cai-watchdog"
fi
source ${APP_PATH}/inc-icons
SCRIPT_NAME=$0
MESSAGE_TEXT=$1
@@ -15,7 +17,7 @@ if [ "$#" -ne 1 ]; then
exit 0
fi
ARGS=$(xargs echo $(perl -anle 's/^[^:]+//g && s/:\s+//g && print' ${APP_PATH}/email.conf) < /dev/null)
ARGS=$(xargs echo $(perl -anle 's/^[^:]+//g && s/:\s+//g && print' ${APP_PATH}/telegram.conf) < /dev/null)
set -- $ARGS "$@";
GROUP_ID=$1

View File

@@ -44,7 +44,7 @@ if [ "$#" -ne 3 ]; then
exit 0
fi
ARGS=$(xargs echo $(perl -anle 's/^[^:]+//g && s/:\s+//g && print' ${APP_PATH}/email.conf) < /dev/null)
ARGS=$(xargs echo $(perl -anle 's/^[^:]+//g && s/:\s+//g && print' ${APP_PATH}/telegram.conf) < /dev/null)
set -- $ARGS "$@";
GROUP_ID=$1