Changeset 11 for scripts/usr/local/bin/7dtd-instances.sh
- Timestamp:
- May 15, 2014, 8:49:17 PM (11 years ago)
- File:
-
- 1 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
Note:
See TracChangeset
for help on using the changeset viewer.