HEX
Server: LiteSpeed
System: Linux CentOS-79-64-minimal 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: vishn3436 (5293)
PHP: 8.0.15
Disabled: NONE
Upload Files
File: //scripts/checkSilverPMA.sh
#!/bin/bash
URL="http://5.9.111.147:8083/"
keyword="phpMyAdmin"

if curl -sSf --max-time 5 "$URL" | grep "$keyword"
then
    # if the keyword is in the content
    echo "Silvera PMA is working fine"
else
    echo "Resolving Silvera PMA Issue"
    cd /data/silvera_rojmel_db
    docker-compose down
#    service docker restart
    docker-compose up -d --build --remove-orphans
    curl --location --request POST 'https://marketing.wp.karmanye.in/api/Karmanye/send-message'  --header 'Content-Type: application/json; charset=utf-8'  --header 'Accept: application/json'  --header 'Authorization: Bearer $2b$10$f7yAQHm3Y1eOxs92aiEJ9eohJ0AdUQ2YwXxUARzk3sVLgKIVw0k2q' -d '{ "phone": "919033595842", "message": "*Silvera PMA Server not working, Restarted Service*"}'
fi