Files
scripts_serv/snapraid-ping.sh
T
2026-04-30 13:13:42 +00:00

12 lines
429 B
Bash
Executable File

#!/bin/bash
/usr/bin/python3 /opt/snapraid-runner/snapraid-runner.py -c /opt/snapraid-runner/snapraid-runner.conf
STATE=$?
if [ $STATE -le 2 ]; then
# Success or Warning (still successful sync)
/usr/bin/curl -fsS "https://uptime.liphlink.xyz/api/push/a73pMB3WnL?status=up&msg=ExitCode_$STATE"
else
# Hard Failure
/usr/bin/curl -fsS "https://uptime.liphlink.xyz/api/push/a73pMB3WnL?status=down&msg=Failed_Code_$STATE"
fi