reordered services and added new ones
This commit is contained in:
parent
8597360359
commit
7b457b9c9a
15
bot.sh
15
bot.sh
|
@ -45,12 +45,16 @@ while [ "${1}" == "start" ]; do
|
||||||
editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "checking again."
|
editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "checking again."
|
||||||
__ip="$(./getip.sh "${bot_tmpdir}")"
|
__ip="$(./getip.sh "${bot_tmpdir}")"
|
||||||
editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "checking again.."
|
editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "checking again.."
|
||||||
|
ps -w -w -U steam -o args= | grep "TShock.Server" >/dev/null \
|
||||||
|
&& __terraria_status="online" || __terraria_status="offline"
|
||||||
|
ps -w -w -U steam -o args= | grep "factorio" >/dev/null \
|
||||||
|
&& __factorio_status="online" || __factorio_status="offline"
|
||||||
ps -w -w -U syncplay -o args= | grep "syncplay-server" >/dev/null \
|
ps -w -w -U syncplay -o args= | grep "syncplay-server" >/dev/null \
|
||||||
&& __syncplay_status="online" || __syncplay_status="offline"
|
&& __syncplay_status="online" || __syncplay_status="offline"
|
||||||
editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "checking again..."
|
editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "checking again..."
|
||||||
ps -w -w -U steam -o args= | grep "hlds_linux" >/dev/null \
|
ps -w -w -U steam -o args= | grep "hlds_linux" >/dev/null \
|
||||||
&& __cstrike_status="online" || __cstrike_status="offline"
|
&& __cstrike_status="online" || __cstrike_status="offline"
|
||||||
editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "${__ip}%0Asyncplay(${__syncplay_status}): port 60000%0Acstrike(${__cstrike_status}): port 64000" "${inline_kbd}"
|
editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "${__ip}%0Aterraria(${__terraria_status}): port 7777%0Afactorio(${__factorio_status}: port 34197%0Asyncplay(${__syncplay_status}): port 60000%0Acstrike(${__cstrike_status}): port 64000" "${inline_kbd}"
|
||||||
unset curmsg
|
unset curmsg
|
||||||
declare -A curmsg
|
declare -A curmsg
|
||||||
getmsg_content curmsg sentmsgs.txt
|
getmsg_content curmsg sentmsgs.txt
|
||||||
|
@ -58,11 +62,16 @@ while [ "${1}" == "start" ]; do
|
||||||
}
|
}
|
||||||
[ "${curmsg[text]}" == "/start" ] && {
|
[ "${curmsg[text]}" == "/start" ] && {
|
||||||
__ip="$(./getip.sh "${bot_tmpdir}")"
|
__ip="$(./getip.sh "${bot_tmpdir}")"
|
||||||
|
ps -w -w -U steam -o args= | grep "TShock.Server" >/dev/null \
|
||||||
|
&& __terraria_status="online" || __terraria_status="offline"
|
||||||
|
ps -w -w -U steam -o args= | grep "factorio" >/dev/null \
|
||||||
|
&& __factorio_status="online" || __factorio_status="offline"
|
||||||
ps -w -w -U syncplay -o args= | grep "syncplay-server" >/dev/null \
|
ps -w -w -U syncplay -o args= | grep "syncplay-server" >/dev/null \
|
||||||
&& __syncplay_status="online" || __syncplay_status="offline"
|
&& __syncplay_status="online" || __syncplay_status="offline"
|
||||||
ps -w -w -U steam -o args= | grep "hlds_run" >/dev/null\
|
editmsg "${curmsg[chat_id]}" "${curmsg[msg_id]}" "checking again..."
|
||||||
|
ps -w -w -U steam -o args= | grep "hlds_linux" >/dev/null \
|
||||||
&& __cstrike_status="online" || __cstrike_status="offline"
|
&& __cstrike_status="online" || __cstrike_status="offline"
|
||||||
sendmsg "${curmsg[chat_id]}" "${__ip}%0Asyncplay(${__syncplay_status}): port 60000%0Acstrike(${__cstrike_status}): port 64000" "${inline_kbd}"
|
sendmsg "${curmsg[chat_id]}" "${__ip}%0Aterraria(${__terraria_status}): port 7777%0Afactorio(${__factorio_status}: port 34197%0Asyncplay(${__syncplay_status}): port 60000%0Acstrike(${__cstrike_status}): port 64000" "${inline_kbd}"
|
||||||
unset curmsg
|
unset curmsg
|
||||||
declare -A curmsg
|
declare -A curmsg
|
||||||
getmsg_content curmsg sentmsgs.txt
|
getmsg_content curmsg sentmsgs.txt
|
||||||
|
|
Loading…
Reference in New Issue