Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand All @@ -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 |

Expand Down
4 changes: 2 additions & 2 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 2 additions & 8 deletions root/etc/s6-overlay/s6-rc.d/svc-kometa/run
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion root/init-hook
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down