[PATCH] start perforce webserver from rc.d script
Mark Santcroos
marks at ripe.net
Tue Jan 4 11:06:44 PST 2005
How about the attached patch to start the perforce webserver
automatically if PERFORCE_WEB_START is configured in perforce.conf?
Mark
--
RIPE NCC - Delft University of Technology - The FreeBSD Project
marks at ripe.net - m.a.santcroos at ewi.tudelft.nl - marks at freebsd.org
-------------- next part --------------
--- perforce.sh Wed Dec 22 11:45:38 2004
+++ perforce.sh Tue Jan 4 18:22:55 2005
@@ -5,6 +5,7 @@
p4d=/usr/local/sbin/p4d
p4ftpd=/usr/local/sbin/p4ftpd
p4p=/usr/local/sbin/p4p
+p4web=/usr/local/bin/p4web
case $1 in
start)
@@ -21,6 +22,10 @@
echo -n ' p4p'
$p4p $PERFORCE_PROXY_OPTIONS
fi
+ if [ -x $p4web -a x$PERFORCE_WEB_START = xyes ]; then
+ echo -n ' p4web'
+ $p4web $PERFORCE_WEB_OPTIONS &
+ fi
;;
stop)
@@ -33,6 +38,9 @@
fi
if [ -x $p4p ]; then
killall -u 0 p4p > /dev/null 2>&1 && echo -n ' p4p'
+ fi
+ if [ -x $p4web ]; then
+ killall -u 0 p4web > /dev/null 2>&1 && echo -n ' p4web'
fi
;;
restart)
--- perforce.conf Wed Dec 22 11:45:38 2004
+++ perforce.conf Tue Jan 4 20:04:05 2005
@@ -58,3 +58,10 @@
# Uncomment this line to have the proxy server started automatically
#
#PERFORCE_PROXY_START=yes
+
+#
+# Perforce web server
+#
+PERFORCE_WEB_PORT="6060"
+PERFORCE_WEB_OPTIONS="-b -l -w $PERFORCE_WEB_PORT -p $PERFORCE_PORT"
+#PERFORCE_WEB_START=yes
More information about the freebsd-ports
mailing list