mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-04 08:15:42 -04:00
feat: add timezone env var and integrate into logs
This commit is contained in:
18
README.md
18
README.md
@@ -370,6 +370,24 @@ The following volumes can be mounted with this container:
|
|||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `./thetvapp:/config` | Path which stores downloaded `.m3u8`, `.xml`, nginx configs, and optional SSL certificate/keys |
|
| `./thetvapp:/config` | Path which stores downloaded `.m3u8`, `.xml`, nginx configs, and optional SSL certificate/keys |
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
By mounting the volume above, you should now have access to the following folders:
|
||||||
|
- 📁 keys
|
||||||
|
- 📁 log
|
||||||
|
- 📁 nginx
|
||||||
|
- 📁 php
|
||||||
|
- 📁 www
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
| Folder | Description |
|
||||||
|
| --- | --- |
|
||||||
|
| 📁 keys | Responsible for storing your ssl certificate `cert.crt` + key `cert.key` |
|
||||||
|
| 📁 log | All nginx and php logs |
|
||||||
|
| 📁 nginx | Contains `nginx.conf`, `resolver.conf`, `ssl.conf`, `site-confs` |
|
||||||
|
| 📁 php | Contains `php-local.ini`, `www2.conf` |
|
||||||
|
| 📁 www | Folder where downloaded `.m3u8`, `.xml`, and `.xml.gz` will be downloaded to |
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
DATE=$(date '+%m-%d-%Y %H:%M:%S')
|
# #
|
||||||
|
# @project thetvapp-docker
|
||||||
|
# @about download script for fetching m3u8 and xml
|
||||||
|
# @file /download.sh
|
||||||
|
# @repo https://github.com/Aetherinox/thetvapp-docker
|
||||||
|
# #
|
||||||
|
|
||||||
|
DATE=$(TZ=${TZ} date '+%m-%d-%Y %H:%M:%S')
|
||||||
|
|
||||||
# #
|
# #
|
||||||
# Run Download
|
# Run Download
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
# @repo https://github.com/Aetherinox/thetvapp-docker
|
# @repo https://github.com/Aetherinox/thetvapp-docker
|
||||||
# #
|
# #
|
||||||
|
|
||||||
SUBJECT="/C=US/ST=CA/L=NA/O=thetvapp-docker/OU=Aetherinox TheTvApp/CN=*"
|
SUBJECT="/C=NA/ST=NA/L=NA/O=thetvapp-docker/OU=Aetherinox TheTvApp/CN=*"
|
||||||
if [[ -f /config/keys/cert.key && -f /config/keys/cert.crt ]]; then
|
if [[ -f /config/keys/cert.key && -f /config/keys/cert.crt ]]; then
|
||||||
echo -e " SSL : Using existing keys found in /config/keys"
|
echo -e " SSL : Using existing keys found in /config/keys"
|
||||||
else
|
else
|
||||||
|
|||||||
17
run.sh
17
run.sh
@@ -2,13 +2,21 @@
|
|||||||
# shellcheck shell=bash
|
# 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
|
set -f
|
||||||
|
|
||||||
# #
|
# #
|
||||||
# For details see man crontabs
|
# For details see man crontabs
|
||||||
|
#
|
||||||
# Example of job definition:
|
# Example of job definition:
|
||||||
# .---------------- minute (0 - 59)
|
# .---------------- minute (0 - 59)
|
||||||
# | .------------- hour (0 - 23)
|
# | .------------- hour (0 - 23)
|
||||||
@@ -20,12 +28,17 @@ set -f
|
|||||||
# #
|
# #
|
||||||
|
|
||||||
ARG_CRON_TIME=$(echo ${CRON_TIME})
|
ARG_CRON_TIME=$(echo ${CRON_TIME})
|
||||||
|
|
||||||
if [ -z "${ARG_CRON_TIME}" ]; then
|
if [ -z "${ARG_CRON_TIME}" ]; then
|
||||||
ARG_CRON_TIME="0/60 * * * *"
|
ARG_CRON_TIME="0/60 * * * *"
|
||||||
fi
|
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 " Config : Setting task to run ${ARG_CRON_TIME}"
|
||||||
|
echo -e " Setting timezone ${ARG_TZ}"
|
||||||
echo "${ARG_CRON_TIME} sh /download.sh" > /crontab.conf
|
echo "${ARG_CRON_TIME} sh /download.sh" > /crontab.conf
|
||||||
crontab /crontab.conf
|
crontab /crontab.conf
|
||||||
set +f
|
set +f
|
||||||
|
|||||||
Reference in New Issue
Block a user