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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -6,7 +6,7 @@ User=wwwrun
|
||||
Group=www
|
||||
Type=simple
|
||||
ExecStart=/usr/local/sbin/cai-watchdog
|
||||
#ExecStopPost=/etc/cai-watchdog/on-stop
|
||||
ExecStopPost=/etc/cai-watchdog/on-stop
|
||||
|
||||
KillMode=control-group
|
||||
NotifyAccess=all
|
||||
|
||||
Reference in New Issue
Block a user