Changeset 90 for scripts


Ignore:
Timestamp:
Jul 19, 2014, 2:26:26 PM (10 years ago)
Author:
alloc
Message:

v.32 hotfix: Add new commands to admins-template

Location:
scripts/usr/local/lib/7dtd/commands
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • scripts/usr/local/lib/7dtd/commands/instances.sh

    r24 r90  
    99                if [ $(isRunning $I) -eq 1 ]; then
    1010                        run="yes"
    11                         tel=$(telnetCommand $I lp)
    12                         cur=`echo $tel | sed "s/\r/\n/g" | sed "s/^ //g" | grep "Total of " | cut -d\  -f 3`
     11                        cur=$(telnetCommand $I lp | grep -E "^\s?Total of " | cut -d\  -f 3)
    1312                else
    1413                        run="no"
  • scripts/usr/local/lib/7dtd/commands/status.sh

    r58 r90  
    2020                echo "Open ports:"
    2121                netstat -nlp | grep $(getInstancePID $1) | sed -r 's/^([^ ]*)\s+.*[^ :]*:([^ ]*).*[^ :]*:[^ ]*.*/    \2 (\1)/g' | sort
    22                 tel=$(telnetCommand $1 lp)
    23                 cur=`echo $tel | sed "s/\r/\n/g" | sed "s/^ //g" | grep "Total of " | cut -d\  -f 3`
     22                cur=$(telnetCommand $1 lp | grep -E "^\s?Total of " | cut -d\  -f 3)
    2423                echo "Players: $cur"
    2524        else
Note: See TracChangeset for help on using the changeset viewer.