coppit / docker-no-ip

Docker container for No-IP DNS updater
GNU General Public License v2.0
77 stars 53 forks source link

Running with environment variables does not seem to be working #10

Open demaniak opened 5 years ago

demaniak commented 5 years ago

I might be missing something but I can't get the container to work with environment variables.

So, the log output is like so:

noip_no-ip.1.lup5ogdpjdtj@rat1.local    | All required settings passed as environment variables. Skipping config file creation.
noip_no-ip.1.lup5ogdpjdtj@rat1.local    | Started runsvdir, PID is 14. Waiting for processes to start....
noip_no-ip.1.8m09hxrau66p@rat1.local    | All required settings passed as environment variables. Skipping config file creation.
noip_no-ip.1.8m09hxrau66p@rat1.local    | Started runsvdir, PID is 14. Waiting for processes to start....
noip_no-ip.1.lup5ogdpjdtj@rat1.local    | [Sep 12 21:17:08] Launching the noip2 daemon
noip_no-ip.1.8m09hxrau66p@rat1.local    | [Sep 12 21:13:44] Launching the noip2 daemon
noip_no-ip.1.8m09hxrau66p@rat1.local    | Can't locate configuration file /config/no-ip2.generated.conf. (Try -c). Ending!
noip_no-ip.1.lup5ogdpjdtj@rat1.local    | Can't locate configuration file /config/no-ip2.generated.conf. (Try -c). Ending!
noip_no-ip.1.lup5ogdpjdtj@rat1.local    | 
noip_no-ip.1.8m09hxrau66p@rat1.local    | 
noip_no-ip.1.lup5ogdpjdtj@rat1.local    | run: noip: (pid 17) 5s
noip_no-ip.1.8m09hxrau66p@rat1.local    | run: noip: (pid 17) 5s
noip_no-ip.1.8m09hxrau66p@rat1.local    | [Sep 12 21:13:49] Current status
noip_no-ip.1.lup5ogdpjdtj@rat1.local    | [Sep 12 21:17:13] Current status
noip_no-ip.1.8m09hxrau66p@rat1.local    | Can't locate configuration file /config/no-ip2.generated.conf. (Try -c). Ending!
noip_no-ip.1.8m09hxrau66p@rat1.local    | [Sep 12 21:13:49] ERROR: noip2 daemon has stopped running. Restarting it in 60 seconds.
noip_no-ip.1.lup5ogdpjdtj@rat1.local    | Can't locate configuration file /config/no-ip2.generated.conf. (Try -c). Ending!

So the environment variables are found, and is passing the checks.

This then causes config file generation to be skipped (parse_config_file.sh) Well and good, BUT, looking at noip.sh, it used GENERATED_CONFIG_FILE=/config/no-ip2.generated.conf for the configuration file location, which is passed to the noip2 executable via -c parameter.

And that file does not exist, because it's creation was skipped, because the env vars were passed. So noip client dies, gets started again , rinse, repeat.

Did I miss something here? Am I doing something wrong?

mregni commented 3 years ago

It is 2021 and this issue is not yet fixed. For anyone that hits this issue, I created a fork from this project here. Hope my fix works :)