Double-check for files to stat in .plexupdate check

This commit is contained in:
Alex Malinovich 2016-11-25 20:17:00 -08:00
commit 24dd899bf5

View file

@ -262,7 +262,9 @@ if ! hash wget 2>/dev/null; then
fi fi
#FIXME: Temporary error checking to notify people of change from .plexupdate to plexupdate.conf #FIXME: Temporary error checking to notify people of change from .plexupdate to plexupdate.conf
if [ -z "${CONFIGFILE}" -a -f ~/.plexupdate -a ! -f /etc/plexupdate.conf ] || [ `stat -Lc %i "${CONFIGFILE}"` == `stat -Lc %i ~/.plexupdate` ]; then # We have to double-check that both files exist before trying to stat them. This is going away soon.
if [ -z "${CONFIGFILE}" -a -f ~/.plexupdate -a ! -f /etc/plexupdate.conf ] || \
[ -f "${CONFIGFILE}" -a -f ~/.plexupdate ] && [ `stat -Lc %i "${CONFIGFILE}"` == `stat -Lc %i ~/.plexupdate` ]; then
warn ".plexupdate has been deprecated. You should move your configuration to /etc/plexupdate.conf" warn ".plexupdate has been deprecated. You should move your configuration to /etc/plexupdate.conf"
if [ -t 1 ]; then if [ -t 1 ]; then
for i in `seq 1 5`; do echo -n .\ ; sleep 1; done for i in `seq 1 5`; do echo -n .\ ; sleep 1; done