mirror of
https://github.com/TheBinaryNinja/tvapp2.git
synced 2026-06-04 07:05: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 |
|
||||
|
||||
<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 />
|
||||
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
#!/usr/bin/with-contenv 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
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# @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
|
||||
echo -e " SSL : Using existing keys found in /config/keys"
|
||||
else
|
||||
|
||||
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