Ignore:
Timestamp:
May 16, 2014, 2:13:55 PM (11 years ago)
Author:
alloc
Message:

Instances script updated, more info in list and optional command to show a single instace with details

File:
1 edited

Legend:

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

    r10 r13  
    11#!/bin/bash
    2 # Version 1
     2# Version 2
    33
    44# Provides common functions for 7dtd-scripts. Not intended to be run directly.
     
    5252}
    5353
     54# Get the PID of the instance if it is running, 0 otherwise
     55# Params:
     56#   1: Instance name
     57# Returns:
     58#   0 if not running
     59#   PID otherwise
     60getInstancePID() {
     61        run=$(isRunning $1)
     62        if [ $run -eq 1 ]; then
     63                cat $(getInstancePath $1)/7dtd.pid
     64        else
     65                echo 0
     66        fi
     67}
     68
    5469# Get a single value from a serverconfig
    5570# Params:
Note: See TracChangeset for help on using the changeset viewer.