update
This commit is contained in:
16
defaults.inc
Executable file
16
defaults.inc
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
VERS=2.2.1-07042023
|
||||
|
||||
SENDNOTICE(){
|
||||
[ "${PUSHOVER_APP_TOKEN}" != "" ] && PUSH_TO_MOBILE "${2}
|
||||
|
||||
$(date)" "${1}" ${3} &
|
||||
|
||||
[ "${EMAIL_NOTICE}" != "" ] && echo -e "${2}\n\n$(date)" | mail -s "${1}" ${EMAIL_NOTICE}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
12
dsmon.sh
12
dsmon.sh
@@ -4,11 +4,10 @@
|
||||
source /opt/idssys/defaults/colors.inc
|
||||
source /opt/idssys/defaults/default.inc
|
||||
source /opt/idssys/dsmon/config.settings.inc
|
||||
source /opt/idssys/dsmon/defaults.inc
|
||||
|
||||
action="$1"
|
||||
|
||||
VERS=2.2.1-07042023
|
||||
|
||||
RUN(){
|
||||
if [ "${SERVERMON_ID}" != "" ]; then
|
||||
|
||||
@@ -320,15 +319,6 @@ GETCRONTAB(){
|
||||
crontab -l | sshpass -p${1} ssh -o 'StrictHostKeyChecking no' root@10.10.10.50 'cat > /opt/idssys/nodemgmt/crontabs/`hostname`.crontab'
|
||||
}
|
||||
|
||||
SENDNOTICE(){
|
||||
[ "${PUSHOVER_APP_TOKEN}" != "" ] && PUSH_TO_MOBILE "${2}
|
||||
|
||||
$(date)" "${1}" ${3} &
|
||||
|
||||
[ "${EMAIL_NOTICE}" != "" ] && echo -e "${2}\n\n$(date)" | mail -s "${1}" ${EMAIL_NOTICE}
|
||||
|
||||
}
|
||||
|
||||
case $action in
|
||||
check) CHECK ${2};;
|
||||
setupssh) SETUPSSH;;
|
||||
|
||||
2
run.sh
2
run.sh
@@ -44,7 +44,7 @@ if [ "${1}" == "update" ]; then
|
||||
git pull >/dev/null 2>&1
|
||||
git submodule update --remote >/dev/null 2>&1
|
||||
/bin/chmod +x /opt/idssys/dsmon/dsmon.sh 2>&1
|
||||
source /opt/idssys/dsmon/dsmon.sh
|
||||
source /opt/idssys/dsmon/defaults.inc
|
||||
if [ "${2}" != "q" ]; then
|
||||
echo -en "\e[1A";
|
||||
echo -e "\e[0K\r ${idsCL[Green]}Updated to v${VERS}${idsCL[Default]}"
|
||||
|
||||
Reference in New Issue
Block a user