From ee8ec46a164546c18f6235bbcc1d5fd2dea6e15b Mon Sep 17 00:00:00 2001 From: Andrew Parker Date: Tue, 27 Oct 2015 14:41:50 -0600 Subject: [PATCH] This echo is displayed on Debian systems. It should only be displayed for Red Hat systems, so I moved it. It should also only be displayed if the -s switch isn't used, so I added a check for it. --- plexupdate.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plexupdate.sh b/plexupdate.sh index 2d483ad..01231c5 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -263,9 +263,11 @@ SKIP_DOWNLOAD="no" # Installed version detection (only supported for deb based systems, feel free to submit rpm equivalent) if [ "${REDHAT}" != "yes" ]; then - echo "Your distribution may require the use of the AUTOSTART [-s] option for the service to start after the upgrade completes." INSTALLED_VERSION=$(dpkg-query -s plexmediaserver 2>/dev/null | grep -Po 'Version: \K.*') else + if [ "${AUTOSTART}" == "no" ]; then + echo "Your distribution may require the use of the AUTOSTART [-s] option for the service to start after the upgrade completes." + fi INSTALLED_VERSION=$(rpm -qv plexmediaserver 2>/dev/null) fi if [[ $FILENAME == *$INSTALLED_VERSION* ]] && [ "${FORCE}" != "yes" ] && [ ! -z "${INSTALLED_VERSION}" ]; then