diff --git a/README.md b/README.md index 25696cf..ae7a8f0 100644 --- a/README.md +++ b/README.md @@ -94,9 +94,9 @@ services: - PGID=1000 - TZ=Etc/UTC - KOMETA_CONFIG=/config/config.yml #optional - - KOMETA_TIME=03:00 #optional + - KOMETA_TIMES=03:00 #optional - KOMETA_RUN=False #optional - - KOMETA_TEST=False #optional + - KOMETA_TESTS=False #optional - KOMETA_NO_MISSING=False #optional volumes: - /path/to/kometa/config:/config @@ -112,9 +112,9 @@ docker run -d \ -e PGID=1000 \ -e TZ=Etc/UTC \ -e KOMETA_CONFIG=/config/config.yml `#optional` \ - -e KOMETA_TIME=03:00 `#optional` \ + -e KOMETA_TIMES=03:00 `#optional` \ -e KOMETA_RUN=False `#optional` \ - -e KOMETA_TEST=False `#optional` \ + -e KOMETA_TESTS=False `#optional` \ -e KOMETA_NO_MISSING=False `#optional` \ -v /path/to/kometa/config:/config \ --restart unless-stopped \ @@ -131,9 +131,9 @@ Containers are configured using parameters passed at runtime (such as those abov | `-e PGID=1000` | for GroupID - see below for explanation | | `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). | | `-e KOMETA_CONFIG=/config/config.yml` | Specify a custom config file to use. | -| `-e KOMETA_TIME=03:00` | Comma-separated list of times to update each day. Format: `HH:MM`. | +| `-e KOMETA_TIMES=03:00` | Comma-separated list of times to update each day. Format: `HH:MM`. | | `-e KOMETA_RUN=False` | Set to `True` to run without the scheduler. | -| `-e KOMETA_TEST=False` | Set to `True` to run in debug mode with only collections that have `test: true`. | +| `-e KOMETA_TESTS=False` | Set to `True` to run in debug mode with only collections that have `test: true`. | | `-e KOMETA_NO_MISSING=False` | Set to `True` to run without any of the missing movie/show functions. | | `-v /config` | Persistent config files | diff --git a/readme-vars.yml b/readme-vars.yml index b6249c8..c4b3402 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -27,9 +27,9 @@ param_volumes: opt_param_usage_include_env: true opt_param_env_vars: - {env_var: "KOMETA_CONFIG", env_value: "/config/config.yml", desc: "Specify a custom config file to use."} - - {env_var: "KOMETA_TIME", env_value: "03:00", desc: "Comma-separated list of times to update each day. Format: `HH:MM`."} + - {env_var: "KOMETA_TIMES", env_value: "03:00", desc: "Comma-separated list of times to update each day. Format: `HH:MM`."} - {env_var: "KOMETA_RUN", env_value: "False", desc: "Set to `True` to run without the scheduler."} - - {env_var: "KOMETA_TEST", env_value: "False", desc: "Set to `True` to run in debug mode with only collections that have `test: true`."} + - {env_var: "KOMETA_TESTS", env_value: "False", desc: "Set to `True` to run in debug mode with only collections that have `test: true`."} - {env_var: "KOMETA_NO_MISSING", env_value: "False", desc: "Set to `True` to run without any of the missing movie/show functions."} readonly_supported: false nonroot_supported: false diff --git a/root/etc/s6-overlay/s6-rc.d/svc-kometa/run b/root/etc/s6-overlay/s6-rc.d/svc-kometa/run index 79430a7..33bea25 100755 --- a/root/etc/s6-overlay/s6-rc.d/svc-kometa/run +++ b/root/etc/s6-overlay/s6-rc.d/svc-kometa/run @@ -21,16 +21,10 @@ if [[ -n "${CONFIG_FILE}" ]] && [[ ! -e "${CONFIG_FILE}" ]]; then s6-rc -bad change fi -if { echo "${CLI_OPTIONS[@]}" | grep -qPo '([\s]|^)(--time|-t)([\s])'; } && { echo "${CLI_OPTIONS[@]}" | grep -qPo '([\s]|^)(--config|-c)([\s])(.+\/[^\/]+)\.(yml|yaml)'; }; then +if echo "${CLI_OPTIONS[@]}" | grep -qPo '([\s]|^)(--config|-c)([\s])(.+\/[^\/]+)\.(yml|yaml)'; then exec \ s6-setuidgid abc python3 /app/kometa/kometa.py "${CLI_OPTIONS[@]}" -elif echo "${CLI_OPTIONS[@]}" | grep -qPo '([\s]|^)(--time|-t)([\s])'; then - exec \ - s6-setuidgid abc python3 /app/kometa/kometa.py --config "${CONFIG_FILE}" "${CLI_OPTIONS[@]}" -elif echo "${CLI_OPTIONS[@]}" | grep -qPo '([\s]|^)(--config|-c)([\s])(.+\/[^\/]+)\.(yml|yaml)'; then - exec \ - s6-setuidgid abc python3 /app/kometa/kometa.py --time "${KOMETA_TIME:-03:00}" "${CLI_OPTIONS[@]}" else exec \ - s6-setuidgid abc python3 /app/kometa/kometa.py --config "${CONFIG_FILE}" --time "${KOMETA_TIME:-03:00}" "${CLI_OPTIONS[@]}" + s6-setuidgid abc python3 /app/kometa/kometa.py --config "${CONFIG_FILE}" "${CLI_OPTIONS[@]}" fi diff --git a/root/init-hook b/root/init-hook index 9583521..1b7bf1e 100755 --- a/root/init-hook +++ b/root/init-hook @@ -3,7 +3,7 @@ IFS="|" read -r -a CLI_OPTIONS <<< "$CLI_OPTIONS_STRING" -if [[ $(tr "[:upper:]" "[:lower:]" <<<"${KOMETA_RUN}") = "true" ]] || echo "${CLI_OPTIONS[@]}" | grep -qPo '([\s]|^)(--run|--tests|--run-collections|--run-libraries|--run-files|--resume|-r|-ts|-rc|-rl|-rf|-re)([\s]|$)'; then +if [[ $(tr "[:upper:]" "[:lower:]" <<<"${KOMETA_RUN}") = "true" ]] || echo "${CLI_OPTIONS[@]}" | grep -qPo '([\s]|^)(--run|--r|--tests|--ts|--rt|--test|--run-test|--run-tests|--run-collections|--rc|--cl|--collection|--collections|--run-collection|--run-libraries|--rl|--l|--library|--libraries|--run-library|--run-files|--rf|--rm|--m|--run-file|--metadata|--metadata-files|--run-metadata-files|--resume|--re)([\s]|$)'; then rm -rf /etc/s6-overlay/s6-rc.d/svc-kometa rm -rf /etc/s6-overlay/s6-rc.d/user/contents.d/svc-kometa mkdir -p /etc/s6-overlay/s6-rc.d/user2/contents.d/