Changeset 20 for scripts


Ignore:
Timestamp:
May 23, 2014, 6:47:10 PM (11 years ago)
Author:
alloc
Message:

Version 5. Fixes #9, #11

Location:
scripts/usr/local/lib/7dtd
Files:
11 edited

Legend:

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

    r17 r20  
    11#!/bin/bash
    2 # Version 4
     2# Version 5
    33
    44# Backups game data files.
  • scripts/usr/local/lib/7dtd/commands/instances.sh

    r19 r20  
    11#!/bin/bash
    2 # Version 4
     2# Version 5
    33
    44
  • scripts/usr/local/lib/7dtd/commands/start.sh

    r18 r20  
    11#!/bin/bash
    2 # Version 4
     2# Version 5
    33
    44# Tries to start the 7dtd instance.
     
    3131                rm $SDTD_BASE/engine/7DaysToDie_Data/output_log.txt
    3232               
     33                for H in $(getHooksFor serverPreStart); do
     34                        $H $INSTANCE
     35                done
     36
    3337                SSD_PID="--pidfile $(getInstancePath $1)/7dtd.pid --make-pidfile"
    3438                SSD_DAEMON="--background --no-close"
     
    3842                start-stop-daemon --start $SSD_PID $SSD_DAEMON $SSD_USER --chdir $SDTD_BASE/engine --exec $WINE -- $SDTD_BASE/engine/7DaysToDie.exe $OPTS > $(getInstancePath $1)/stdout.log 2>&1
    3943                sleep 1
     44
     45                for H in $(getHooksFor serverPostStart); do
     46                        $H $INSTANCE
     47                done
     48
    4049                if [ $(isRunning $1) -eq 1 ]; then
    4150                        SSD_MONITOR_PID="--pidfile $(getInstancePath $1)/monitor.pid --make-pidfile"
  • scripts/usr/local/lib/7dtd/commands/status.sh

    r19 r20  
    11#!/bin/bash
    2 # Version 4
     2# Version 5
    33
    44# Print status of given instance.
  • scripts/usr/local/lib/7dtd/commands/stop.sh

    r18 r20  
    11#!/bin/bash
    2 # Version 4
     2# Version 5
    33
    44# Tries to stop the 7dtd instance given as first parameter.
     
    2828        res=$(isRunning $1)
    2929        if [ $res -eq 1 ]; then
     30                for H in $(getHooksFor serverPreStop); do
     31                        $H $INSTANCE
     32                done
     33
    3034                echo "Trying to gracefully shutdown..."
    3135                tmp=$(telnetCommand $1 shutdown)
     
    5054
    5155                rm $(getInstancePath $1)/7dtd.pid
     56
     57                for H in $(getHooksFor serverPostStop); do
     58                        $H $INSTANCE
     59                done
     60
    5261                echo "Done"     
    5362        else
  • scripts/usr/local/lib/7dtd/commands/updateengine.sh

    r19 r20  
    11#!/bin/bash
    2 # Version 4
     2# Version 5
    33
    44# Tries to start the 7dtd instance.
  • scripts/usr/local/lib/7dtd/common.sh

    r19 r20  
    11#!/bin/bash
    2 # Version 4
     2# Version 5
    33
    44# Provides common functions for 7dtd-scripts. Not intended to be run directly.
  • scripts/usr/local/lib/7dtd/help.sh

    r17 r20  
    11#!/bin/bash
    2 # Version 4
     2# Version 5
    33
    44genericHelp() {
  • scripts/usr/local/lib/7dtd/monitor-log.sh

    r18 r20  
    11#!/bin/bash
    2 # Version 4
     2# Version 5
    33
    44. /usr/local/lib/7dtd/common.sh
  • scripts/usr/local/lib/7dtd/playerlog.sh

    r17 r20  
    11#!/bin/bash
    2 # Version 4
     2# Version 5
    33
    44timestamp() {
  • scripts/usr/local/lib/7dtd/serverconfig.sh

    r19 r20  
    11#!/bin/bash
    2 # Version 4
     2# Version 5
    33
    44# Provides functions to query and validate values for serverconfig.xml
Note: See TracChangeset for help on using the changeset viewer.