mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
pholus 2.2
This commit is contained in:
@@ -3,21 +3,29 @@
|
||||
|
||||
# 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/config/pialert.conf
|
||||
FILECONF=/home/pi/pialert/config/pialert.conf
|
||||
if [ -f "$FILECONF" ]; then
|
||||
sed -ie "s|Europe/Berlin|${TZ}|g" /home/pi/pialert/config/pialert.conf
|
||||
else
|
||||
sed -ie "s|Europe/Berlin|${TZ}|g" /home/pi/pialert/back/pialert.conf_bak
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "${PORT}" ]; then
|
||||
sed -ie 's/listen 20211/listen '${PORT}'/g' /etc/nginx/sites-available/default
|
||||
fi
|
||||
fi
|
||||
|
||||
# I hope this will fix DB permission issues going forward
|
||||
chown -R www-data:www-data /home/pi/pialert/db/pialert.db
|
||||
FILEDB=/home/pi/pialert/db/pialert.db
|
||||
if [ -f "$FILEDB" ]; then
|
||||
chown -R www-data:www-data /home/pi/pialert/db/pialert.db
|
||||
fi
|
||||
|
||||
chmod -R a+rw /home/pi/pialert/front/log
|
||||
chmod -R a+rw /home/pi/pialert/config
|
||||
|
||||
/etc/init.d/php7.4-fpm start
|
||||
/etc/init.d/nginx start
|
||||
|
||||
# cron -f
|
||||
|
||||
python /home/pi/pialert/back/pialert.py
|
||||
|
||||
Reference in New Issue
Block a user