Jump to content

Question: How to start mangos server ?


Recommended Posts

Hi again from me.

I have one question:

How to start mangos world and realm and it stay online ? (start the server)

I am started it using putty but when I close putty server is down.

Is there any wow server control panel or any script for start / stop server ?

and please help me with the problem:

http://getmangos.eu/community/viewtopic.php?id=14599

thanks !

Link to comment
Share on other sites

  • 40 years later...

Agreed. Screen is what I use. You can try this script to start up mangosd and realmd in the background.

note* rename mangos-world to mangosd and mangos-realmd to realmd.

Other than this code, you can try to use the 'nohup' command:

nohup ./mangos-world &

nohup ./mangos-realmd &

version=0.1.9

MANGOSDIR=/opt/mangos/

case "$1" in

"")

echo "${0##*/} version ${version}, Author: Weedy"

echo "Usage: ${0##*/} <options>" # No command-line parameters,

echo "" # or first parameter empty.

echo "Normal Options:"

echo " start stop restart"

exit $E_PARAM

;;

"start")

cd $MANGOSDIR

screen -dmS realmd ./bin/realmd

screen -dmS mangosd ./bin/mangosd

monitorMangosdPid=`ps ax | awk '($6 ~ /monitor-mangosd/) { print $1 }'`

if test "$monitorMangosdPid" = ""

then

screen -dmS monitor-mangosd ./src/mangosd/monitor-mangosd

fi

sleep 3

realmdPid=`ps ax | awk '($5 ~ /realmd/) { print $1 }'`

mangosdPid=`ps ax | awk '($5 ~ /mangosd/) { print $1 }'`

if test "$realmdPid" = ""

then

echo "Realmd failed to start"

fi

if test "$mangosdPid" = ""

then

echo "Mangosd failed to start"

fi

echo "Mangos is now online"

;;

"stop")

realmdPid=`ps ax | awk '($5 ~ /realmd/) { print $1 }'`

mangosdPid=`ps ax | awk '($5 ~ /mangosd/) { print $1 }'`

runMangosdPid=`ps ax | awk '($6 ~ /run-mangosd/) { print $1 }'`

if test "$realmdPid" != ""

then

kill $realmdPid

wait $realmdPid >/dev/null 2>&1

fi

if test "$mangosdPid" != ""

then

(sleep 1; echo 'USER EDIT_ME_LEVEL3_GM'; sleep 1; echo 'PASS EDIT_ME_TO'; sleep 1;echo 'broadcast Server shuting down - 30s .save warning'; sleep 15; echo 'broadcast Server shuting down - 15s .save warning'; sleep 15; echo 'broadcast Server offline;-)'; sleep 1; echo 'exit'; sleep 1 ) | telnet localhost 34226

wait $mangosdPid >/dev/null 2>&1

fi

if test "$runMangosdPid" != ""

then

kill $runMangosdPid

wait $runMangosdPid >/dev/null 2>&1

fi

sleep 3

echo "Mangos is now offline :-("

;;

"restart")

realmdPid=`ps ax | awk '($5 ~ /realmd/) { print $1 }'`

mangosdPid=`ps ax | awk '($5 ~ /mangosd/) { print $1 }'`

runMangosdPid=`ps ax | awk '($6 ~ /run-mangosd/) { print $1 }'`

if test "$realmdPid" != ""

then

kill $realmdPid

wait $realmdPid >/dev/null 2>&1

fi

if test "$mangosdPid" != ""

then

(sleep 1; echo 'USER EDIT_ME_LEVEL3_GM'; sleep 1; echo 'PASS EDIT_ME_TO'; sleep 1;echo 'broadcast Server restarting - 30s .save warning'; sleep 15; echo 'broadcast Server restarting - 15s .save warning'; sleep 15; echo 'broadcast Server offline;-)'; sleep 1; echo 'exit'; sleep 1 ) | telnet localhost 34226

wait $mangosdPid >/dev/null 2>&1

fi

if test "$runMangosdPid" != ""

then

kill $runMangosdPid

wait $runMangosdPid >/dev/null 2>&1

fi

echo "Mangos is now offline, restarting;-)"

cd $MANGOSDIR

screen -dmS realmd ./bin/realmd

screen -dmS mangosd ./bin/run-mangosd

sleep 3

realmdPid=`ps ax | awk '($5 ~ /realmd/) { print $1 }'`

mangosdPid=`ps ax | awk '($5 ~ /mangosd/) { print $1 }'`

if test "$realmdPid" = ""

then

echo "Realmd failed to start"

fi

if test "$mangosdPid" = ""

then

echo "Mangosd failed to start"

fi

echo "Mangos is now online"

;;

esac

exit $?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use