1 Anexo(s)
Oscam Status Check Script
Oscam Status Check Script
Este script de verificação detecta quando o oscam web-interface não está mais respondendo, quando não o oscam é iniciado novamente.
Guia de como implementar
- #!/bin/sh
- #
- FOO=”/tmp/_tmp”
- LOGIN=”root”
- PW=”xx”
- IP=”192.168.1.xx”
- PORT=”16002″
- STR=”TITLE>”
- #
- curl -s –digest -o – -u $LOGIN:$PW “http://$IP:$PORT/status.html?hideidle=0″ | grep “$STR” > $FOO
- printf “Checking for ERRORS …\n”;
- if [ -s $FOO ]; then
- printf “\033[37;32mOscam working OK\033[37;40m\n”;
- else
- printf “\033[37;31mOscam ERROR!\033[37;40m\n”;
- /usr/local/bin/oscam -b > /dev/null
- fi
- rm -f $FOO
- exit 0