Архиватор снимков неба над Томском панорамной камерой http://tomsk-sky.blindage.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

daily-job.sh 1.0KB

123456789101112131415161718
  1. #!/bin/bash
  2. cd "$(dirname "$0")"
  3. source zabbix_creds
  4. srcpath="/srv/tomsk-sky.blindage.org/tomsk-sky-archiver"
  5. ts=$(date -u '+%F')
  6. wget --save-cookies=daily-job.cookies -4 --keep-session-cookies -O - -S --post-data="name=${zbxuser}&password=${zbxpass}&enter=Sign in&autologin=1" "${zbxurl}/index.php?login=1"
  7. wget -4 --load-cookies=daily-job.cookies -O datadir/$ts/graph_termo_utc+7.png "${zbxurl}/chart2.php?graphid=1005&from=now-24h&to=now&profileIdx=web.graphs.filter&profileIdx2=1005&width=959&_=tf88n7na&screenid="
  8. wget -4 --load-cookies=daily-job.cookies -O datadir/$ts/graph_pressure_utc+7.png "${zbxurl}/chart2.php?graphid=989&from=now-24h&to=now&profileIdx=web.graphs.filter&profileIdx2=989&width=959&_=tf89xtu8&screenid="
  9. find ./datadir/${ts} -name "*.jpg" -type f -exec ./jpeginfo -c {} \; | grep -E "WARNING|ERROR" | cut -d " " -f 1 > gengal-invalid.list
  10. xargs rm < gengal-invalid.list
  11. docker run -t --rm --name sky-gallery-generator -v $srcpath:/work -u $(id -u):$(id -g) thumbsupgallery/thumbsup sh /work/gengal.sh