Files
NetAlertX/dockerfiles/start.sh
2022-08-05 13:21:53 +00:00

18 lines
523 B
Bash
Executable File

#!/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/Berlin|${TZ}|g" /home/pi/pialert/install/pialert.cron
sed -ie "s|Europe/Berlin|${TZ}|g" /home/pi/pialert/config/pialert.conf
crontab < /home/pi/pialert/install/pialert.cron
fi
if [ -n "${PORT}" ]; then
sed -ie 's/listen 20211/listen '${PORT}'/g' /etc/nginx/sites-available/default
fi
/etc/init.d/php7.4-fpm start
/etc/init.d/nginx start
cron -f