Last change
on this file since 11 was 10, checked in by alloc, 11 years ago |
Version 1
|
-
Property svn:executable
set to
*
|
File size:
515 bytes
|
Rev | Line | |
---|
[9] | 1 | #!/bin/bash
|
---|
[10] | 2 | # Version 1
|
---|
| 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 | checkInstance $1
|
---|
| 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.