mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-27 00:38:27 +00:00
Merge pull request #309 from klightspeed/1.4#cmdstatus
Return the status from the last command run
This commit is contained in:
commit
c62b3b4a14
@ -334,11 +334,13 @@ function checkForUpdate(){
|
|||||||
echo -e "Available version:" "$GREEN" $bnumber "$NORMAL"
|
echo -e "Available version:" "$GREEN" $bnumber "$NORMAL"
|
||||||
echo -e "Your server needs to be restarted in order to receive the latest update."
|
echo -e "Your server needs to be restarted in order to receive the latest update."
|
||||||
echo -e "Run \"arkmanager update\" to do so"
|
echo -e "Run \"arkmanager update\" to do so"
|
||||||
|
return 1
|
||||||
else
|
else
|
||||||
tput rc; tput ed;
|
tput rc; tput ed;
|
||||||
echo -e "Current version:" "$GREEN" $instver "$NORMAL"
|
echo -e "Current version:" "$GREEN" $instver "$NORMAL"
|
||||||
echo -e "Available version:" "$GREEN" $bnumber "$NORMAL"
|
echo -e "Available version:" "$GREEN" $bnumber "$NORMAL"
|
||||||
echo "Your server is up to date!"
|
echo "Your server is up to date!"
|
||||||
|
return 0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1410,8 +1412,11 @@ while true; do
|
|||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
status=$?
|
||||||
shift
|
shift
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
exit $status
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user