Changeset 11
- Timestamp:
- May 15, 2014, 8:49:17 PM (11 years ago)
- Location:
- scripts/usr/local/bin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/usr/local/bin/7dtd-instances.sh
r10 r11 5 5 # Returns: 6 6 # 0 7 7 8 . /usr/local/bin/7dtd-common.sh 8 9 checkRootLoadConf … … 16 17 if [ $run -eq 1 ]; then 17 18 run="yes" 19 tel=$(telnetCommand $ins lp) 20 cur=`echo $tel | sed "s/\r/\n/g" | sed "s/^ //g" | grep "Total of " | cut -d\ -f 3` 18 21 else 19 22 run="no" 23 cur=0 20 24 fi 21 25 22 tel=$(telnetCommand $ins lp)23 26 max=$(getConfigValue $ins ServerMaxPlayerCount) 24 cur=`echo $tel | sed "s/\r/\n/g" | sed "s/^ //g" | grep "Total of " | cut -d\ -f 3`25 27 26 28 printf "%-*s | %*s | %2d/%2d\n" 20 "$ins" 8 "$run" $cur $max -
scripts/usr/local/bin/7dtd-kill.sh
r10 r11 16 16 res=$(isRunning $1) 17 17 if [ $res -eq 1 ]; then 18 telnetCommand shutdown 19 start-stop-daemon --stop --pidfile $(getInstancePath $1)/7dtd.pid 18 telnetCommand $1 shutdown 19 sleep 1 20 res=$(isRunning $1) 21 if [ $res -eq 1 ]; then 22 start-stop-daemon --stop --pidfile $(getInstancePath $1)/7dtd.pid 23 fi 20 24 rm $(getInstancePath $1)/7dtd.pid 21 25 echo "Done"
Note:
See TracChangeset
for help on using the changeset viewer.