~ salmonella-environment-setup (master) /awful/init-scripts/awful-wrapper


 1#!/bin/sh
 2# Awful wrapper script because it has no daemonize feature
 3# First argument is the PID file and second argument is the logfile
 4# It expects to find the awful binary in /home/chicken/chickens/use-this/bin/awful
 5
 6PIDFILE=$1
 7LOGFILE=$2
 8
 9args=""
10[ -e "/usr/local/etc/awful/awful.conf" ] && args="/usr/local/etc/awful/awful.conf $args"
11[ -e "/usr/local/etc/awful/privileged.conf" ] && args="--privileged-code=/usr/local/etc/awful/privileged.conf $args"
12
13rm -f $PIDFILE
14/home/chicken/chickens/use-this/bin/awful $args 2>&1 > $LOGFILE &
15pid=$!
16exit_code=$?
17if [ "$exit_code" = "0" ]; then
18    echo $pid > $PIDFILE
19    return 0
20else
21    return 2
22fi
Trap