mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-04 05:15:42 -04:00
feat: add timezone env var and integrate into logs
This commit is contained in:
17
run.sh
17
run.sh
@@ -2,13 +2,21 @@
|
||||
# shellcheck shell=bash
|
||||
|
||||
# #
|
||||
# Disable, otherwise cron asterisks will be converted to file paths.
|
||||
# @project thetvapp-docker
|
||||
# @about initial run script, creates cron
|
||||
# @file /run.sh
|
||||
# @repo https://github.com/Aetherinox/thetvapp-docker
|
||||
# #
|
||||
|
||||
# #
|
||||
# Disable, or cron asterisks will be converted to file paths.
|
||||
# #
|
||||
|
||||
set -f
|
||||
|
||||
# #
|
||||
# For details see man crontabs
|
||||
#
|
||||
# Example of job definition:
|
||||
# .---------------- minute (0 - 59)
|
||||
# | .------------- hour (0 - 23)
|
||||
@@ -20,12 +28,17 @@ set -f
|
||||
# #
|
||||
|
||||
ARG_CRON_TIME=$(echo ${CRON_TIME})
|
||||
|
||||
if [ -z "${ARG_CRON_TIME}" ]; then
|
||||
ARG_CRON_TIME="0/60 * * * *"
|
||||
fi
|
||||
|
||||
ARG_TZ=$(echo ${TZ})
|
||||
if [ -z "${ARG_TZ}" ]; then
|
||||
ARG_TZ="Etc/UTC"
|
||||
fi
|
||||
|
||||
echo -e " Config : Setting task to run ${ARG_CRON_TIME}"
|
||||
echo -e " Setting timezone ${ARG_TZ}"
|
||||
echo "${ARG_CRON_TIME} sh /download.sh" > /crontab.conf
|
||||
crontab /crontab.conf
|
||||
set +f
|
||||
|
||||
Reference in New Issue
Block a user