mirror of
https://github.com/linuxserver/docker-flexget.git
synced 2026-06-03 09:57:36 +00:00
update init for fg env
This commit is contained in:
@@ -5,17 +5,19 @@ mkdir -p \
|
||||
/config/.flexget \
|
||||
/data
|
||||
|
||||
FG_CONFIG_FILE="${FG_CONFIG_FILE:-/config/.flexget/config.yml}"
|
||||
FG_LOCK_FILE="${FG_CONFIG_FILE/config.yml/.config-lock}"
|
||||
# clean up config-lock from unclean shutdown
|
||||
if [[ -f "/config/.flexget/.config-lock" ]]; then
|
||||
rm -rf "/config/.flexget/.config-lock"
|
||||
if [[ -f "${FG_LOCK_FILE}" ]]; then
|
||||
rm -rf "${FG_LOCK_FILE}"
|
||||
fi
|
||||
|
||||
if [[ ! -f "/config/.flexget/config.yml" ]]; then
|
||||
cp /default/config.yml /config/.flexget/config.yml
|
||||
if [[ ! -f "{$FG_CONFIG_FILE}" ]]; then
|
||||
cp /default/config.yml "${FG_CONFIG_FILE}"
|
||||
fi
|
||||
|
||||
if [[ -n "${FG_WEBUI_PASSWORD}" ]]; then
|
||||
if ! flexget --loglevel error web passwd "${FG_WEBUI_PASSWORD}" | tee /dev/stderr | grep -q 'Updated password'; then
|
||||
if ! flexget -c "${FG_CONFIG_FILE}" --loglevel error web passwd "${FG_WEBUI_PASSWORD}" | tee /dev/stderr | grep -q 'Updated password'; then
|
||||
echo "Halting init, please address the above issues and recreate the container"
|
||||
sleep infinity
|
||||
fi
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
exec \
|
||||
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 5050" \
|
||||
s6-setuidgid abc python3 /lsiopy/bin/flexget \
|
||||
--loglevel "${FG_LOG_LEVEL:-info}" --logfile "${FG_LOG_FILE:-/config/flexget.log}" -c "${FG_CONFIG_FILE:-/config/.flexget/config.yml}" daemon start --autoreload-config
|
||||
--loglevel "${FG_LOG_LEVEL:-info}" --logfile "${FG_LOG_FILE:-/config/.flexget/flexget.log}" -c "${FG_CONFIG_FILE:-/config/.flexget/config.yml}" daemon start --autoreload-config
|
||||
|
||||
Reference in New Issue
Block a user