cpoppema / docker-flexget

An auto updating FlexGet container.
82 stars 39 forks source link

Docker container fails on startup due to .config-lock #38

Closed carlba closed 4 years ago

carlba commented 5 years ago

What about adding

# Make sure the .config-lock file is absent on start of Docker container
rm -rf /config/.config-lock

to 20-update-flexget.sh

cpoppema commented 5 years ago

Hi @carlba, sorry for this late reply.

The .config-lock is a file created by FlexGet and assumingly left behind if the process died for reason (or server power outage).

It is however also possible another instance of FlexGet is already running - assuming you see this error:

Invalid lock file. Make sure FlexGet is not running, then delete it.

While it is OK to remove it manually and restart FlexGet, this docker container does not have the access to check whether or not there might be another FlexGet (dockerized or not) currently using .config-lock.

I will think about supporting this behavior however, one way or another. Most likely with a default-enabled environment variable. Thanks for reporting :+1:

cpoppema commented 5 years ago

I'm just putting this here before I forget: Following FlexGet's own example in https://flexget.com/InstallWizard/SynologyNAS/Docker removing the lock file is not an issue whatsoever.

#!/bin/sh
if [ -f ~/.flexget/.config-lock ]; then
    rm ~/.flexget/.config-lock
fi
Oshayr commented 4 years ago

I like the idea of the environment variable for this.

cpoppema commented 4 years ago

Have you run into issues with this recently @Chaosmagnetx ? Just curious.

cpoppema commented 4 years ago

While working on a different issue I ran into this problem myself, resulting in a boot-loop where I'd get an error saying connection refused. So it's finally here :smile:.