Auto update now handles some more obscure situations

Launch plexupdate using "bash plexupdate.sh" will not cause the
autoupdate function to fail anymore. Also tries to handle the error
if it would fail.
This commit is contained in:
Henric Andersson 2015-11-06 08:55:56 -08:00
commit 653588d43c

View file

@ -121,7 +121,16 @@ if [ "${AUTOUPDATE}" == "yes" ]; then
fi
echo "OK"
popd >/dev/null
$0 ${ALLARGS} -U
if ! type "$0" 2>/dev/null >/dev/null ; then
if [ -f "$0" ]; then
/bin/bash "$0" ${ALLARGS} -U
else
echo "Error: Unable to relaunch, couldn't find $0"
exit 1
fi
else
"$0" ${ALLARGS} -U
fi
exit $?
fi