mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Dockerfile Pass Timezone
This commit is contained in:
@@ -31,7 +31,7 @@ COPY . /home/pi/pialert
|
||||
# Pi.Alert
|
||||
RUN python /home/pi/pialert/back/pialert.py update_vendors \
|
||||
&& sed -ie 's/= 80/= '${PORT}'/g' /etc/lighttpd/lighttpd.conf \
|
||||
# && sed -i.bak 's/^TIMEZONE=.*/TIMEZONE='${TZ}'/' /home/pi/pialert/config/pialert.conf \
|
||||
sed "s+TIMEZONE.*+TIMEZONE = '" ${TZ} "'+" /home/pi/pialert/config/pialert.conf \
|
||||
&& (crontab -l 2>/dev/null; cat /home/pi/pialert/install/pialert.cron) | crontab -
|
||||
|
||||
# it's easy for permissions set in Git to be overridden, so doing it manually
|
||||
|
||||
@@ -7,6 +7,13 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// Puche 2021 pi.alert.application@gmail.com GNU GPLv3
|
||||
//------------------------------------------------------------------------------
|
||||
// ## TimeZone processing
|
||||
$config_file = "../../../config/pialert.conf";
|
||||
$config_file_lines = file($config_file);
|
||||
$config_file_lines_timezone = array_values(preg_grep('/^TIMEZONE\s.*/', $config_file_lines));
|
||||
$timezone_line = explode("'", $config_file_lines_timezone[0]);
|
||||
$Pia_TimeZone = $timezone_line[1];
|
||||
date_default_timezone_set($Pia_TimeZone);
|
||||
|
||||
foreach (glob("../../../db/setting_language*") as $filename) {
|
||||
$pia_lang_selected = str_replace('setting_language_','',basename($filename));
|
||||
|
||||
@@ -7,7 +7,13 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// Puche 2021 pi.alert.application@gmail.com GNU GPLv3
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// ## TimeZone processing
|
||||
$config_file = "../../../config/pialert.conf";
|
||||
$config_file_lines = file($config_file);
|
||||
$config_file_lines_timezone = array_values(preg_grep('/^TIMEZONE\s.*/', $config_file_lines));
|
||||
$timezone_line = explode("'", $config_file_lines_timezone[0]);
|
||||
$Pia_TimeZone = $timezone_line[1];
|
||||
date_default_timezone_set($Pia_TimeZone);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// External files
|
||||
|
||||
Reference in New Issue
Block a user