Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
paip
/
script
/
weight
/
Or
Select Your Path :
Upload File :
New :
File
Dir
//paip/script/weight/process_check.sh
#!/bin/bash SERVER=127.0.0.1 PORT=8890 PID=`netstat -ntlp 2>/dev/null | grep ${PORT} | awk '{print $7}' | cut -d '/' -f 1` echo "PID : $PID" if [ $PID -gt 0 ]; then if nc -nvz -w 1 $SERVER $PORT > /dev/null;then echo "normal" # curl -d '{ "@context":"https://schema.org/extensions", "@type":"MessageCard", "themeColor":"0072C6", "title":"DL API server", "text":"DL restAPI server[status:normal]" }' -H "Content-Type: Application/JSON" --url https://paiptree.webhook.office.com/webhookb2/cd00fc26-9e4f-4f84-844a-f5f54fcfb045@fe2870e7-ec9b-4920-bae0-e916e653b10c/IncomingWebhook/1a7a9f8151bb45e0b54cb5635a85fb3a/85fcf23c-17d4-49f7-bff0-a8f3265d2d29 else echo "started but suspended" fi else echo "stoped" # curl -d '{ "@context":"https://schema.org/extensions", "@type":"MessageCard", "themeColor":"0072C6", "title":"DL API server", "text":"check DL restAPI server[status:stop]" }' -H "Content-Type: Application/JSON" --url https://paiptree.webhook.office.com/webhookb2/cd00fc26-9e4f-4f84-844a-f5f54fcfb045@fe2870e7-ec9b-4920-bae0-e916e653b10c/IncomingWebhook/1a7a9f8151bb45e0b54cb5635a85fb3a/85fcf23c-17d4-49f7-bff0-a8f3265d2d29 fi