Jeeaaasus / youtube-dl

Automated yt-dlp Docker image
https://hub.docker.com/r/jeeaaasustest/youtube-dl/
MIT License
266 stars 34 forks source link

Only delete /etc/services.d/webserver if exists #42

Closed Caedis closed 3 years ago

Caedis commented 3 years ago

Another option is to use rf -rf /etc/services.d/webserver since the f flag ignores missing files

Was fataling with:

[cont-init.d] 80-webui: executing...
[web-ui] webserver is disabled.
rm: cannot remove '/etc/services.d/webserver': No such file or directory
[cont-init.d] 80-webui: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.

Tested with a locally built image

Jeeaaasus commented 3 years ago

oh.. yep that makes sense, I totally didn't consider what would happen if you start/restart an existing container..

Personally, I value readability and I feel simply using -f with rm is the most easily understood option. I'll happily merge if you make the fix like the second option you said. (rm -rf /etc/services.d/webserver)

I really appreciate your help and time @Caedis Thank you :)

Caedis commented 3 years ago

Made the quick change