mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-13 03:18:28 +00:00
improved outputs
This commit is contained in:
parent
f9c97a2bd2
commit
911ec781b7
@ -49,11 +49,13 @@ function testfunction(){
|
||||
#
|
||||
function checkForUpdate(){
|
||||
if isUpdateNeeded; then
|
||||
tput rc; tput ed;
|
||||
echo -e "Current version:" "$RED" $instver "$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 "Run \"arkmanager update\" to do so"
|
||||
else
|
||||
tput rc; tput ed;
|
||||
echo -e "Current version:" "$GREEN" $instver "$NORMAL"
|
||||
echo -e "Available version:" "$GREEN" $bnumber "$NORMAL"
|
||||
echo "Your server is up to date!"
|
||||
@ -165,10 +167,13 @@ doStart() {
|
||||
#
|
||||
doStop() {
|
||||
if isTheServerRunning; then
|
||||
tput sc
|
||||
echo "Stopping server..."
|
||||
# kill the server with the PID
|
||||
PID=`ps -ef | grep "$arkserverroot/$arkserverexec" | grep -v grep | awk '{print $2}'`
|
||||
kill -9 $PID
|
||||
|
||||
tput rc; tput ed;
|
||||
echo "$timestamp: stop" >> "$logdir/arkserver.log"
|
||||
else
|
||||
echo "The server is already stopped"
|
||||
@ -264,6 +269,8 @@ case "$1" in
|
||||
#testfunction
|
||||
;;
|
||||
checkupdate)
|
||||
tput sc
|
||||
echo "Querying Steam database for latest version..."
|
||||
checkForUpdate
|
||||
;;
|
||||
broadcast)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user