linuxserver / docker-radarr

GNU General Public License v3.0
640 stars 103 forks source link

Limit apt-get warn to applicable configs - closes #176, #168 #177

Closed ChrisBaker97 closed 2 years ago

ChrisBaker97 commented 2 years ago

linuxserver.io



Description:

With the rebase to Alpine, a warning was added to Radarr's Status page that any user scripts utilizing apt-get would need to be updated for apk. This has apparently caused some consternation for users who either do not use apt-get in their custom scripts or have already properly updated them to use apk, especially because this warning can't be cleared by the user and creates a bubble on the main tab menu which is indistinguishable from other errors, such as failed indexers.

This change moves the custom message generation from the Dockerfiles to a new OpenRC startup script (80-apk-warn-msg) containing logic which only adds the custom message to \app\radarr\package_info if apt-get is contained inside a file located in the user's /config/custom-cont-init.d/ directory, which should limit the message's visibility to installations where the warning could prove useful. This check therefore runs at every startup, so once an affected user modifies their custom scripts to remove references to apt-get the error message will no longer appear.

Benefits of this PR and context:

Addresses issues #168, #176.

How Has This Been Tested?

Although I don't have a Docker build environment set up to thoroughly test this modification, I have manually added 80-apk-warn-msg to /etc/cont-init.d inside the running container to verify that it performs as expected, based on whether apt-get appears in any file in the /config/custom-cont-init.d/ directory or not.

Source / References:

N/A

LinuxServer-CI commented 2 years ago

I am a bot, here are the test results for this PR: https://ci-tests.linuxserver.io/lspipepr/radarr/4.1.0.6175-pkg-aed9dc8b-pr-177/index.html https://ci-tests.linuxserver.io/lspipepr/radarr/4.1.0.6175-pkg-aed9dc8b-pr-177/shellcheck-result.xml

LinuxServer-CI commented 2 years ago

I am a bot, here are the test results for this PR: https://ci-tests.linuxserver.io/lspipepr/radarr/4.1.0.6175-pkg-aed9dc8b-pr-177/index.html https://ci-tests.linuxserver.io/lspipepr/radarr/4.1.0.6175-pkg-aed9dc8b-pr-177/shellcheck-result.xml