1
0

fix ping not reveived

This commit is contained in:
setop 2025-07-07 09:18:02 +02:00
parent be3023f55d
commit aead526ed3
4 changed files with 17 additions and 5 deletions

View File

@ -3,7 +3,7 @@
# specific to alpine, won't work with debian # specific to alpine, won't work with debian
# place crontab /!\ UTC time # place crontab /!\ UTC time
printf "ping=\"curl -fsS -m 10 --retry 5 -o /dev/null ${HC_PING}\"\n${SCHEDULE} /app/scripts/runjob.sh && \${ping} || \${ping}/fail \n" | crontab - printf "${SCHEDULE} /app/scripts/runjob.sh \n" | crontab -
# start cron # start cron
crond -f exec crond -f

View File

@ -1,4 +1,4 @@
#!/bin/sh -eu #!/bin/sh -eu
/app/bootstrap -c /app/sqlpage/sqlpage.json exec /app/bootstrap -d /app/sqlpage/

9
scripts/refresh_stats.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh -eu
CMDD=$(dirname $(realpath $0))
cd $(dirname "${CMDD}") # spider must run from app folder
python -m scrapy runspider src/instances.py
${CMDD}/refresh_day_stats.sh

View File

@ -1,5 +1,8 @@
#!/bin/sh -eu #!/bin/sh -eu
CMDD=$(dirname $(realpath $0)) CMDD=$(dirname $(realpath $0))
cd $(dirname "${CMDD}")
python -m scrapy runspider src/instances.py ping="curl -fsS -m 10 --retry 5 -o /dev/null ${HC_PING}"
${ping}/start
${CMDD}/refresh_stats.sh && ${ping} || ${ping}/fail