#!/bin/sh # # installed by the portbuild application # # PROVIDE: qmanager # REQUIRE: LOGIN cleanvar export PATH=/usr/local/bin:${PATH} pb=${portbuild_base:-/a/portbuild} config_file=${pb}/conf/server.conf if [ ! -f ${config_file} ]; then echo "$0: ${config_file} must exist!" exit 1 fi . ${config_file} if [ -z "${PORTBUILD_USER}" ]; then echo "$0: You must define PORTBUILD_USER in ${config_file}." exit 1 fi case $1 in start) s=${pb}/qmanager/qmanager.py if [ -x $s ]; then running=`ps ax | grep -v grep | grep $s` if [ -z "${running}" ]; then su - ${PORTBUILD_USER} -c "${s}" & echo -n ' qmanager' else echo "qmanager already running" fi fi ;; stop) # XXX ;; esac echo