added support for custom port, fixed the time zone issue caused by cron

This commit is contained in:
jokob-sk
2022-07-16 10:08:04 +10:00
parent 18727a0c9c
commit d14e32a882
5 changed files with 29 additions and 19 deletions

View File

@@ -1,8 +1,14 @@
#!/bin/sh
/home/pi/pialert/dockerfiles/user-mapping.sh
# if custom variables not set we do not need to do anything
if [ -n "${TZ}" ]; then
sed -ie "s|Europe/London|${TZ}|g" /home/pi/pialert/install/pialert.cron
crontab < /home/pi/pialert/install/pialert.cron
fi
if [ -n "${PORT}" ]; then
sed -ie 's/= 20211/= '${PORT}'/g' /etc/lighttpd/lighttpd.conf
fi
#chmod -R 755 /var/www/html/pialert
#chmod -R o+w /home/pi/pialert/db
/etc/init.d/lighttpd start
cron -f