This repository was archived by the owner on Apr 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ cd / || exit 1
5
5
# halt startup if no config file is found
6
6
if [[ -n ${PMM_CONFIG} ]]; then
7
7
CONFIG_FILE=${PMM_CONFIG}
8
- elif echo "${CLI_OPTIONS}" | grep -qPo '[\s]? (--config|-c)([^\S ])(.+\/[^\/]+)\.(yml|yaml)'; then
9
- CONFIG_FILE=$(echo "${CLI_OPTIONS}" | grep -Po '[\s]? (--config|-c)([^\S ])\K(.+\/[^\/]+)\.(yml|yaml)')
8
+ elif echo "${CLI_OPTIONS}" | grep -qPo '( [\s]|^) (--config|-c)([\s ])(.+\/[^\/]+)\.(yml|yaml)'; then
9
+ CONFIG_FILE=$(echo "${CLI_OPTIONS}" | grep -Po '( [\s]|^) (--config|-c)([\s ])\K(.+\/[^\/]+)\.(yml|yaml)')
10
10
else
11
11
CONFIG_FILE="/config/config.yml"
12
12
fi
@@ -16,11 +16,11 @@ if [[ -n "${CONFIG_FILE}" ]] && [[ ! -e "${CONFIG_FILE}" ]]; then
16
16
s6-rc -bad change
17
17
fi
18
18
19
- if { echo "${CLI_OPTIONS}" | grep -qPo '[\s]? (--run|-r)([^\S ]|$)'; } && { echo "${CLI_OPTIONS}" | grep -qPo '[\s]? (--config|-c)([^\S ])(.+\/[^\/]+)\.(yml|yaml)'; }; then
19
+ if { echo "${CLI_OPTIONS}" | grep -qPo '( [\s]|^) (--run|-r)([\s ]|$)'; } && { echo "${CLI_OPTIONS}" | grep -qPo '( [\s]|^) (--config|-c)([\s ])(.+\/[^\/]+)\.(yml|yaml)'; }; then
20
20
s6-setuidgid abc python3 /app/pmm/plex_meta_manager.py ${CLI_OPTIONS}
21
- elif echo "${CLI_OPTIONS}" | grep -qPo '[\s]? (--run|-r)([^\S ]|$)'; then
21
+ elif echo "${CLI_OPTIONS}" | grep -qPo '( [\s]|^) (--run|-r)([\s ]|$)'; then
22
22
s6-setuidgid abc python3 /app/pmm/plex_meta_manager.py --config "${CONFIG_FILE}" ${CLI_OPTIONS}
23
- elif echo "${CLI_OPTIONS}" | grep -qPo '[\s]? (--config|-c)([^\S ])(.+\/[^\/]+)\.(yml|yaml)'; then
23
+ elif echo "${CLI_OPTIONS}" | grep -qPo '( [\s]|^) (--config|-c)([\s ])(.+\/[^\/]+)\.(yml|yaml)'; then
24
24
s6-setuidgid abc python3 /app/pmm/plex_meta_manager.py --run ${CLI_OPTIONS}
25
25
else
26
26
s6-setuidgid abc python3 /app/pmm/plex_meta_manager.py --run --config "${CONFIG_FILE}" ${CLI_OPTIONS}
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ cd / || exit 1
5
5
# halt startup if no config file is found
6
6
if [[ -n ${PMM_CONFIG} ]]; then
7
7
CONFIG_FILE=${PMM_CONFIG}
8
- elif echo "${CLI_OPTIONS}" | grep -qPo '[\s]? (--config|-c)([^\S ])(.+\/[^\/]+)\.(yml|yaml)'; then
9
- CONFIG_FILE=$(echo "${CLI_OPTIONS}" | grep -Po '[\s]? (--config|-c)([^\S ])\K(.+\/[^\/]+)\.(yml|yaml)')
8
+ elif echo "${CLI_OPTIONS}" | grep -qPo '( [\s]|^) (--config|-c)([\s ])(.+\/[^\/]+)\.(yml|yaml)'; then
9
+ CONFIG_FILE=$(echo "${CLI_OPTIONS}" | grep -Po '( [\s]|^) (--config|-c)([\s ])\K(.+\/[^\/]+)\.(yml|yaml)')
10
10
else
11
11
CONFIG_FILE="/config/config.yml"
12
12
fi
@@ -16,13 +16,13 @@ if [[ -n "${CONFIG_FILE}" ]] && [[ ! -e "${CONFIG_FILE}" ]]; then
16
16
s6-rc -bad change
17
17
fi
18
18
19
- if { echo "${CLI_OPTIONS}" | grep -qPo '[\s]? (--time|-t)([^\S ])'; } && { echo "${CLI_OPTIONS}" | grep -qPo '[\s]? (--config|-c)([^\S ])(.+\/[^\/]+)\.(yml|yaml)'; }; then
19
+ if { echo "${CLI_OPTIONS}" | grep -qPo '( [\s]|^) (--time|-t)([\s ])'; } && { echo "${CLI_OPTIONS}" | grep -qPo '( [\s]|^) (--config|-c)([\s ])(.+\/[^\/]+)\.(yml|yaml)'; }; then
20
20
exec \
21
21
s6-setuidgid abc python3 /app/pmm/plex_meta_manager.py ${CLI_OPTIONS}
22
- elif echo "${CLI_OPTIONS}" | grep -qPo '[\s]? (--time|-t)([^\S ])'; then
22
+ elif echo "${CLI_OPTIONS}" | grep -qPo '( [\s]|^) (--time|-t)([\s ])'; then
23
23
exec \
24
24
s6-setuidgid abc python3 /app/pmm/plex_meta_manager.py --config "${CONFIG_FILE}" ${CLI_OPTIONS}
25
- elif echo "${CLI_OPTIONS}" | grep -qPo '[\s]? (--config|-c)([^\S ])(.+\/[^\/]+)\.(yml|yaml)'; then
25
+ elif echo "${CLI_OPTIONS}" | grep -qPo '( [\s]|^) (--config|-c)([\s ])(.+\/[^\/]+)\.(yml|yaml)'; then
26
26
exec \
27
27
s6-setuidgid abc python3 /app/pmm/plex_meta_manager.py --time "${PMM_TIME:-03:00}" ${CLI_OPTIONS}
28
28
else
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/with-contenv bash
2
2
3
- if [[ $(tr "[:upper:]" "[:lower:]" <<<"${PMM_RUN}") = "true" ]] || echo "${CLI_OPTIONS}" | grep -qPo '[\s]? (--run|-r)([^\S ]|$)'; then
3
+ if [[ $(tr "[:upper:]" "[:lower:]" <<<"${PMM_RUN}") = "true" ]] || echo "${CLI_OPTIONS}" | grep -qPo '( [\s]|^) (--run|-r)([\s ]|$)'; then
4
4
rm -rf /etc/s6-overlay/s6-rc.d/svc-pmm
5
5
rm -rf /etc/s6-overlay/s6-rc.d/user/contents.d/svc-pmm
6
6
rm -rf /etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-pmm-config
You can’t perform that action at this time.
0 commit comments