Sha256: 7357c8268b86468fe335a0868da417ce2c89a59e0290b405eeeaea0a2bedf4bb

Contents?: true

Size: 1.25 KB

Versions: 2

Compression:

Stored size: 1.25 KB

Contents

#!/bin/sh
#
# pkgwiz build-bot - this script starts and stops the pkg-wizard build-bot
#
# chkconfig:   - 85 15
# description:  PKG Wizard Build Bot
# processname: build-bot
# config:      /etc/sysconfig/pkgwiz-buildbot
# pidfile:     /home/buildbot/build-bot.pid

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

MOCK_PROFILE='epel-5-x86_64'

if [ -f /etc/sysconfig/pkg-wizard ];then 
	. /etc/sysconfig/pkg-wizard
else
	echo "WARNING: /etc/sysconfig/pkg-wizard config missing"
fi

# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0

pkgwiz="/usr/bin/pkgwiz"
workingdir=/home/buildbot
user="buildbot"
prog=$(basename $pkgwiz)

start() {
    echo -n $"Starting $prog: "
    cd $workingdir && su $user -c "$pkgwiz build-bot --working-dir $workingdir --daemonize --log-format web -m $MOCK_PROFILE"
    retval=$?
    echo
    return $retval
}

stop() {
    echo -n $"Stopping $prog: "
    kill `cat ${workingdir}/build-bot.pid`
    retval=$?
    echo
    return $retval
}

restart() {
    stop
    start
}

case "$1" in
    start)
        $1
        ;;
    stop)
        $1
        ;;
    restart)
        restart
	    ;;
    *)
        echo $"Usage: $0 {start|stop|restart}"
        exit 2
esac

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pkg-wizard-0.1.29 resources/init-scripts/pkgwiz-buildbot
pkg-wizard-0.1.28 resources/init-scripts/pkgwiz-buildbot