From 18f673e96a78c966fafb4a2e107a3158a39e18d3 Mon Sep 17 00:00:00 2001 From: Alex Malinovich Date: Thu, 11 Aug 2016 21:01:13 -0700 Subject: [PATCH] Fix for hash check to make it actually work --- plexupdate.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plexupdate.sh b/plexupdate.sh index 51ac819..f7171ac 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -66,7 +66,7 @@ DEBIAN_INSTALL="dpkg -i" DISTRO_INSTALL="" # Sanity, make sure wget is in our path... -if hash wget 2>/dev/null; then +if ! hash wget 2>/dev/null; then echo "ERROR: This script requires wget in the path. It could also signify that you don't have the tool installed." >&2 exit 1 fi @@ -204,7 +204,7 @@ if [ ! -z "${RELEASE}" ]; then fi if [ "${AUTOUPDATE}" = "yes" ]; then - if hash git 2>/dev/null; then + if ! hash git 2>/dev/null; then echo "ERROR: You need to have git installed for this to work" >&2 cronexit 1 fi @@ -500,7 +500,7 @@ if [ "${AUTOSTART}" = "yes" ]; then echo "The AUTOSTART [-s] option may not be needed on your distribution." fi # Check for systemd - if [ -f "/bin/systemctl" ]; then + if ! hash systemctl 2>/dev/null; then systemctl start plexmediaserver.service else /sbin/service plexmediaserver start