Changeset 25


Ignore:
Timestamp:
May 27, 2014, 10:32:48 AM (11 years ago)
Author:
alloc
Message:

Version 8: start-stop-daemon location by variable

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • bundle_creation/makefile

    r8 r25  
    1313        @cp -r ../scripts/* .
    1414
    15 SSD: usr/local/bin/start-stop-daemon
    16 
    17 # start-stop-daemon:
    18 usr/local/bin/start-stop-daemon: ../tools/start-stop-daemon/start-stop-daemon.c
    19         @echo Compiling start-stop-daemon...
    20         @gcc -Wall -Wextra -Wno-return-type -Os -o $@ $<
     15SSD:
     16        @echo Copying start-stop-daemon source...
     17        @find ../tools -name "*~" -exec rm {} \;
     18        @cp -r ../tools/start-stop-daemon usr/local/lib/7dtd
    2119
    2220clean:
  • scripts/etc/7dtd.conf

    r23 r25  
    2121export XMLSTARLET=/usr/bin/xmlstarlet
    2222export PKILL=/usr/bin/pkill
     23export SSD=/sbin/start-stop-daemon
    2324
  • scripts/usr/local/lib/7dtd/VERSION

    r24 r25  
    1 Current version:        7
    2 Last edit:      2014-05-26
     1Current version:        8
     2Last edit:      2014-05-27
  • scripts/usr/local/lib/7dtd/commands/start.sh

    r23 r25  
    3939                OPTS="-quit -batchmode -nographics -configfile=$(getInstancePath $1)/config.xml -dedicated"
    4040               
    41                 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
     41                $SSD --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
    4242                sleep 1
    4343
     
    4949                        SSD_MONITOR_PID="--pidfile $(getInstancePath $1)/monitor.pid --make-pidfile"
    5050                        SSD_MONITOR_DAEMON="--background"
    51                         start-stop-daemon --start $SSD_MONITOR_PID $SSD_MONITOR_DAEMON --exec "/usr/local/lib/7dtd/monitor-log.sh" -- "$1"
     51                        $SSD --start $SSD_MONITOR_PID $SSD_MONITOR_DAEMON --exec "/usr/local/lib/7dtd/monitor-log.sh" -- "$1"
    5252                        echo "Done!"
    5353                else
  • scripts/usr/local/lib/7dtd/commands/stop.sh

    r23 r25  
    4545                if [ $(isRunning $1) -eq 1 ]; then
    4646                        echo "Failed, force closing server..."
    47                         start-stop-daemon --stop --pidfile $(getInstancePath $1)/7dtd.pid
     47                        $SSD --stop --pidfile $(getInstancePath $1)/7dtd.pid
    4848                fi
    4949
  • scripts/usr/local/lib/7dtd/common.sh

    r23 r25  
    6161#   1 = running
    6262isRunning() {
    63         start-stop-daemon --status --pidfile $(getInstancePath $1)/7dtd.pid
     63        $SSD --status --pidfile $(getInstancePath $1)/7dtd.pid
    6464        if [ $? -eq 0 ]; then
    6565                echo 1
  • tools/start-stop-daemon/makefile

    r6 r25  
    22        gcc -Wall -Wextra -Wno-return-type -o $@ $<
    33
     4install: start-stop-daemon
     5        chown root.root start-stop-daemon
     6        chmod 0755 start-stop-daemon
     7
    48clean:
    59        rm start-stop-daemon
Note: See TracChangeset for help on using the changeset viewer.