[add] check frp service, restart it or push an alert to iphone
This commit is contained in:
parent
d6784fa70c
commit
c6cb2cf281
16
update/restart_frpc.sh
Normal file
16
update/restart_frpc.sh
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
rss=$(ps aux | grep frpc.toml | grep -v grep | awk '{print $6}')
|
||||||
|
if [[ $rss == '' ]]; then
|
||||||
|
python3 /opt/scripts/alert/bark/msgsend.py --title "FRPC Warning" --body "Seems like FRPC Service has been down, need to check ASAP." --group 'frp' --icon 8
|
||||||
|
exit 9
|
||||||
|
fi
|
||||||
|
|
||||||
|
rss=$((rss/1024))
|
||||||
|
|
||||||
|
if [[ $rss -gt 500 ]]; then
|
||||||
|
systemctl restart frpc.service
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
16
update/restart_frps.sh
Normal file
16
update/restart_frps.sh
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
rss=$(ps aux | grep frps.toml | grep -v grep | awk '{print $6}')
|
||||||
|
if [[ $rss == '' ]]; then
|
||||||
|
ssh -o ConnectTimeout=60 beelink 'python3 /opt/scripts/alert/bark/msgsend.py --title "FRPS Warning" --body "Seems like FRPS Service has been down, need to check ASAP." --group "frp" --icon 8'
|
||||||
|
exit 9
|
||||||
|
fi
|
||||||
|
|
||||||
|
rss=$((rss/1024))
|
||||||
|
|
||||||
|
if [[ $rss -gt 1000 ]]; then
|
||||||
|
systemctl restart frps.service
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user