~armagetronad-ap/armagetronad/BattleMania

23 by zodiacsohma1 at gmail
Added server.sh and start.sh for the management of the server.
1
#!/bin/sh
2
3
server="battle_mania"
112 by zodiacsohma1 at gmail
Updated server.sh and start.sh scripts.
4
loc="/home/vertrex/normal/servers/"${server}"/"
5
command=${loc}"command.txt"
6
console=${loc}"console.txt"
23 by zodiacsohma1 at gmail
Added server.sh and start.sh for the management of the server.
7
8
case $1 in
86 by zodiacsohma1 at gmail
Updated TODO.txt.
9
    start)
112 by zodiacsohma1 at gmail
Updated server.sh and start.sh scripts.
10
        if ! screen -list | grep -q ${server}; then
11
            rm -rf ${command}
12
            touch ${command}
13
14
            rm -rf ${console}
15
    
16
            echo "Starting "${server}" immediately!"
17
            screen -dmS ${server} ./server.sh ${server}
18
        else
19
            echo ${server}" is already running..."
20
        fi
86 by zodiacsohma1 at gmail
Updated TODO.txt.
21
    ;;
22
    stop)
112 by zodiacsohma1 at gmail
Updated server.sh and start.sh scripts.
23
        if ! screen -list | grep -q ${server}; then
24
            echo ${server}" server is already stopped..."
25
        else
26
            echo "Stopping "${server}" immediately!"
27
            echo "EXIT" >> ${command}
28
            sleep 1
29
            screen -S ${server} -X quit
30
        fi
86 by zodiacsohma1 at gmail
Updated TODO.txt.
31
    ;;
23 by zodiacsohma1 at gmail
Added server.sh and start.sh for the management of the server.
32
esac