AgathaSorceress-mstdn-ebooks/entrypoint.sh

14 lines
362 B
Bash
Raw Permalink Normal View History

2023-02-08 12:58:40 +01:00
#!/bin/bash
set -xe
(echo "${POST_TIMINGS} cd /ebooks/ && python gen.py"; \
echo "${FETCH_TIMINGS} cd /ebooks/ && python main.py"; \
echo "@reboot cd /ebooks/ && python reply.py") | crontab -
test -f data/config.json || echo "{\"site\":\"${EBOOKS_SITE}\"}" > data/config.json
test -f data/toots.db || (python main.py && exit)
exec crond -f -L /dev/stdout