Last change
on this file since 15 was 14, checked in by alloc, 11 years ago |
More instance validation, switch to XMLStarlet, config.xml instead of serverconfig.xml, admins.xml instead of serveradmin.xml
|
-
Property svn:executable
set to
*
|
File size:
520 bytes
|
Rev | Line | |
---|
[9] | 1 | #!/bin/bash
|
---|
[14] | 2 | # Version 3
|
---|
[10] | 3 |
|
---|
[9] | 4 | # Checks if the 7dtd instance given as first parameter is running.
|
---|
| 5 | # Returns:
|
---|
| 6 | # 0 : Running
|
---|
| 7 | # 1 : Not running
|
---|
| 8 | # 2 : No instance name given
|
---|
| 9 | # 3 : No such instance
|
---|
| 10 |
|
---|
| 11 | . /usr/local/bin/7dtd-common.sh
|
---|
| 12 | checkRootLoadConf
|
---|
| 13 |
|
---|
[14] | 14 | checkInstanceValid $1
|
---|
[9] | 15 |
|
---|
| 16 | res=$(isRunning $1)
|
---|
| 17 | if [ $res -eq 1 ]; then
|
---|
| 18 | echo "7dtd instance $1 is running"
|
---|
| 19 | echo "Open ports:"
|
---|
| 20 | netstat -nlp | grep 15161 | sed -r 's/^.*[^ :]*:([^ ]*).*[^ :]*:[^ ]*.*/ \1/g' | sort
|
---|
| 21 | exit 0
|
---|
| 22 | else
|
---|
| 23 | echo "7dtd instance $1 is NOT running"
|
---|
| 24 | exit 1
|
---|
| 25 | fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.