Added auto restart scripts
This commit is contained in:
parent
39ccc74524
commit
32449dd326
16
src/tools/restart-scripts/mangos.sh
Normal file
16
src/tools/restart-scripts/mangos.sh
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#For Debian based distributions only
|
||||||
|
#Change the path variable that matches your own
|
||||||
|
#Do not add a trailing slash
|
||||||
|
path="/home/mangos/server/bin"
|
||||||
|
SESSION="mangos"
|
||||||
|
DAEMON="screen -d -m -S $SESSION $path/mangos_check.sh"
|
||||||
|
screen -r $SESSION -ls -q 2>&1 >/dev/null
|
||||||
|
echo -e ""
|
||||||
|
echo "Mangos World has been launched into the background."
|
||||||
|
echo -e ""
|
||||||
|
if [ $? -le 10 ]; then
|
||||||
|
echo "Restarting $DAEMON"
|
||||||
|
$DAEMON
|
||||||
|
fi
|
||||||
|
wait
|
9
src/tools/restart-scripts/mangos_check.sh
Normal file
9
src/tools/restart-scripts/mangos_check.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#For Debian based distributions only
|
||||||
|
#Change the path variable that matches your own
|
||||||
|
path="/home/mangos/server/bin"
|
||||||
|
while true; do
|
||||||
|
cd $path
|
||||||
|
./realmd
|
||||||
|
wait
|
||||||
|
done
|
16
src/tools/restart-scripts/realmd.sh
Normal file
16
src/tools/restart-scripts/realmd.sh
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#For Debian based distributions only
|
||||||
|
#Change the path variable that matches your own
|
||||||
|
#Do not add a trailing slash
|
||||||
|
path="/home/mangos/server/bin"
|
||||||
|
SESSION="realmd"
|
||||||
|
DAEMON="screen -d -m -S $SESSION $path/realmd_check.sh"
|
||||||
|
screen -r $SESSION -ls -q 2>&1 >/dev/null
|
||||||
|
echo -e ""
|
||||||
|
echo "Realmd has been launched into the background."
|
||||||
|
echo -e ""
|
||||||
|
if [ $? -le 10 ]; then
|
||||||
|
echo "Restarting $DAEMON"
|
||||||
|
$DAEMON
|
||||||
|
fi
|
||||||
|
wait
|
10
src/tools/restart-scripts/realmd_check.sh
Normal file
10
src/tools/restart-scripts/realmd_check.sh
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#For Debian based distributions only
|
||||||
|
#Change the path variable that matches your own
|
||||||
|
#Do not add a trailing slash
|
||||||
|
path="/home/mangos/server/bin"
|
||||||
|
while true; do
|
||||||
|
cd $path
|
||||||
|
./mangos
|
||||||
|
wait
|
||||||
|
done
|
Loading…
x
Reference in New Issue
Block a user