Permalink
Browse files

Fix Fixes

  • Loading branch information...
NEMS Linux
NEMS Linux committed Feb 8, 2019
1 parent c75b12f commit 121ced784c62083e3f7b06e41cc70d7e57f5a67f
Showing with 19 additions and 6 deletions.
  1. +13 −0 info.sh
  2. +6 −6 update.sh
13 info.sh
@@ -346,6 +346,19 @@ elif [[ $COMMAND == "quickfix" ]]; then
echo 0
fi

elif [[ $COMMAND == "fixes" ]]; then
if [[ -e /var/run/nems-fixes.pid ]]; then
pid=$(cat /var/run/nems-fixes.pid)
if ps -p $pid > /dev/null
then
echo 1
else
echo 0
fi
else
echo 0
fi


# Output usage info as no valid command line argument was provided
else
@@ -17,16 +17,16 @@ else
done

# Just in case nems-quickfix is running
quickfix=$(/usr/local/bin/nems-info quickfix)
if [[ $quickfix == 1 ]]; then
fixes=$(/usr/local/bin/nems-info fixes)
if [[ $fixes == 1 ]]; then
echo 'NEMS Linux is currently updating itself. Please wait...'
while [[ $quickfix == 1 ]]
while [[ $fixes == 1 ]]
do
sleep 1
quickfix=$(/usr/local/bin/nems-info quickfix)
fixes=$(/usr/local/bin/nems-info fixes)
done
fi
echo $$ > /var/run/nems-quickfix.pid
echo $$ > /var/run/nems-fixes.pid

# Update nems-migrator
printf "Updating nems-migrator... "
@@ -180,4 +180,4 @@ else
fi
echo ""

rm -f /var/run/nems-quickfix.pid
rm -f /var/run/nems-fixes.pid

0 comments on commit 121ced7

Please sign in to comment.