Changeset 16


Ignore:
Timestamp:
May 17, 2014, 6:14:22 PM (11 years ago)
Author:
alloc
Message:

Minor cleanups

Location:
scripts/usr/local/bin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • scripts/usr/local/bin/7dtd-common.sh

    r14 r16  
    9191#   PID otherwise
    9292getInstancePID() {
    93         run=$(isRunning $1)
    94         if [ $run -eq 1 ]; then
     93        if [ $(isRunning $1) -eq 1 ]; then
    9594                cat $(getInstancePath $1)/7dtd.pid
    9695        else
  • scripts/usr/local/bin/7dtd-instances.sh

    r14 r16  
    1414        echo ${line// /-}
    1515        for I in $(getInstanceList); do
    16                 run=$(isRunning $I)
    17                 if [ $run -eq 1 ]; then
     16                if [ $(isRunning $I) -eq 1 ]; then
    1817                        run="yes"
    1918                        tel=$(telnetCommand $I lp)
     
    4443        echo
    4544
    46         res=$(isRunning $1)
    47         if [ $res -eq 1 ]; then
     45        if [ $(isRunning $1) -eq 1 ]; then
    4846                echo "Status: Running"
    4947                echo "Open ports:"
  • scripts/usr/local/bin/7dtd-running.sh

    r14 r16  
    1414checkInstanceValid $1
    1515
    16 res=$(isRunning $1)
    17 if [ $res -eq 1 ]; then
     16if [ $(isRunning $1) -eq 1 ]; then
    1817        echo "7dtd instance $1 is running"
    1918        echo "Open ports:"
  • scripts/usr/local/bin/7dtd-start.sh

    r14 r16  
    1515checkInstanceValid $1
    1616
    17 res=$(isRunning $1)
    18 if [ $res -eq 0 ]; then
     17if [ $(isRunning $1) -eq 0 ]; then
    1918        if [ ! `pgrep Xvfb` ]; then
    2019                echo "Xvfb not yet running. Starting..."
     
    3130        start-stop-daemon --start $SSD_PID $SSD_DAEMON $SSD_USER --chdir $SDTD_ROOT --exec $WINE -- $SDTD_ROOT/7DaysToDie.exe $OPTS > $(getInstancePath $1)/stdout.log 2>&1
    3231        sleep 1
    33         res=$(isRunning $1)
    34         if [ $res -eq 1 ]; then
     32        if [ $(isRunning $1) -eq 1 ]; then
    3533                echo "Done!"
    3634                exit 0
  • scripts/usr/local/bin/7dtd-update.sh

    r14 r16  
    55checkRootLoadConf
    66
    7 for I in $SDTD_BASE/instances/*; do
    8         ins=`basename $I`
    9         run=$(isRunning $ins)
    10         if [ $run -eq 1 ]; then
     7for I in $(getInstanceList); do
     8        if [ $(isRunning $I) -eq 1 ]; then
    119                echo "At least one instance is still running."
    1210                echo "Before updating the engine please stop all instances!"
Note: See TracChangeset for help on using the changeset viewer.