svn commit: r243122 - in projects/portbuild/etc: . rc.d
Mark Linimon
linimon at FreeBSD.org
Fri Nov 16 02:57:43 UTC 2012
Author: linimon (doc,ports committer)
Date: Fri Nov 16 02:57:42 2012
New Revision: 243122
URL: http://svnweb.freebsd.org/changeset/base/243122
Log:
Rewrite the old, ambiguously-named, portbuild.sh into 3 different
startup scripts. These should get installed to /usr/local/etc/rc.d/ .
Added:
projects/portbuild/etc/
projects/portbuild/etc/rc.d/
projects/portbuild/etc/rc.d/buildproxy.sh (contents, props changed)
projects/portbuild/etc/rc.d/pollmachine.sh (contents, props changed)
projects/portbuild/etc/rc.d/qmanager.sh (contents, props changed)
Added: projects/portbuild/etc/rc.d/buildproxy.sh
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/portbuild/etc/rc.d/buildproxy.sh Fri Nov 16 02:57:42 2012 (r243122)
@@ -0,0 +1,32 @@
+#!/bin/sh
+export PATH=/usr/local/bin:${PATH}
+
+pb=/var/portbuild
+config_file=${pb}/conf/server.conf
+
+if [ ! -f ${config_file} ]; then
+ echo "$0: ${config_file} must exist!"
+ exit 1
+fi
+
+. ${config_file}
+
+case $1 in
+ start)
+ s=${pb}/scripts/buildproxy
+ if [ -x $s ]; then
+ running=`ps ax | grep -v grep | grep $s`
+ if [ -z "${running}" ]; then
+ ${s} &
+ echo -n ' buildproxy'
+ else
+ echo "buildproxy already running"
+ fi
+ fi
+
+ ;;
+ stop)
+ # XXX
+ ;;
+esac
+echo
Added: projects/portbuild/etc/rc.d/pollmachine.sh
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/portbuild/etc/rc.d/pollmachine.sh Fri Nov 16 02:57:42 2012 (r243122)
@@ -0,0 +1,32 @@
+#!/bin/sh
+export PATH=/usr/local/bin:${PATH}
+
+pb=/var/portbuild
+config_file=${pb}/conf/server.conf
+
+if [ ! -f ${config_file} ]; then
+ echo "$0: ${config_file} must exist!"
+ exit 1
+fi
+
+. ${config_file}
+
+case $1 in
+ start)
+ s=${pb}/scripts/pollmachine
+ if [ -x $s ]; then
+ running=`ps ax | grep -v grep | grep $s`
+ if [ -z "${running}" ]; then
+ ${s} -daemon ${SUPPORTED_ARCHS} &
+ echo -n ' pollmachine'
+ else
+ echo "pollmachine already running"
+ fi
+ fi
+
+ ;;
+ stop)
+ # XXX
+ ;;
+esac
+echo
Added: projects/portbuild/etc/rc.d/qmanager.sh
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/portbuild/etc/rc.d/qmanager.sh Fri Nov 16 02:57:42 2012 (r243122)
@@ -0,0 +1,32 @@
+#!/bin/sh
+export PATH=/usr/local/bin:${PATH}
+
+pb=/var/portbuild
+config_file=${pb}/conf/server.conf
+
+if [ ! -f ${config_file} ]; then
+ echo "$0: ${config_file} must exist!"
+ exit 1
+fi
+
+. ${config_file}
+
+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
+ ${s} &
+ echo -n ' qmanager'
+ else
+ echo "qmanager already running"
+ fi
+ fi
+
+ ;;
+ stop)
+ # XXX
+ ;;
+esac
+echo
More information about the svn-src-projects
mailing list