Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D9521065675 for ; Sun, 5 Dec 2010 04:40:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A1FB28FC17 for ; Sun, 5 Dec 2010 04:40:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oB54eAI9053423 for ; Sun, 5 Dec 2010 04:40:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oB54eAgb053422; Sun, 5 Dec 2010 04:40:10 GMT (envelope-from gnats) Resent-Date: Sun, 5 Dec 2010 04:40:10 GMT Resent-Message-Id: <201012050440.oB54eAgb053422@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Garrett Wollman Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F995106566B for ; Sun, 5 Dec 2010 04:30:43 +0000 (UTC) (envelope-from wollman@hergotha.csail.mit.edu) Received: from hergotha.csail.mit.edu (wollman-1-pt.tunnel.tserv4.nyc4.ipv6.he.net [IPv6:2001:470:1f06:ccb::2]) by mx1.freebsd.org (Postfix) with ESMTP id DB25E8FC15 for ; Sun, 5 Dec 2010 04:30:42 +0000 (UTC) Received: from hergotha.csail.mit.edu (localhost [127.0.0.1]) by hergotha.csail.mit.edu (8.14.4/8.14.4) with ESMTP id oB54Ug7G047606 for ; Sat, 4 Dec 2010 23:30:42 -0500 (EST) (envelope-from wollman@hergotha.csail.mit.edu) Received: (from wollman@localhost) by hergotha.csail.mit.edu (8.14.4/8.14.4/Submit) id oB54Ufsq047605; Sat, 4 Dec 2010 23:30:41 -0500 (EST) (envelope-from wollman) Message-Id: <201012050430.oB54Ufsq047605@hergotha.csail.mit.edu> Date: Sat, 4 Dec 2010 23:30:41 -0500 (EST) From: Garrett Wollman To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/152847: buildbot-slave could use a startup script X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Garrett Wollman List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Dec 2010 04:40:11 -0000 >Number: 152847 >Category: ports >Synopsis: buildbot-slave could use a startup script >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Dec 05 04:40:10 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Garrett Wollman >Release: FreeBSD 8.1-RELEASE-p1 amd64 >Organization: FreeBSD Project and MIT >Environment: System: FreeBSD hergotha.csail.mit.edu 8.1-RELEASE-p1 FreeBSD 8.1-RELEASE-p1 #1 r215854M: Sat Nov 27 02:07:10 EST 2010 wollman@hergotha.csail.mit.edu:/usr/obj/usr/src/sys/HERGOTHA amd64 devel/buildbot-slave 0.81 >Description: When one installs buildbot-slave, it is likely that one would like the daemon start automatically once the software is configured. >How-To-Repeat: ls /usr/ports/devel/buildbot-slave/files. Note no rc script. >Fix: Here is a very simple one that I am using successfully. It can only handle one buildslave environment per machine (I am using one virtual machine per environment). It will need a few generalizations to make it ${PREFIX}-safe and Python-version-independent. Making buildslave's startup a bit quieter by default would be a nice addition. #! /bin/sh # # $FreeBSD$ # # PROVIDE: buildslave # REQUIRE: LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable buildslave: # #buildslave_enable="YES" #buildslave_directory="/home/buildbot/path/to/slave" . /etc/rc.subr name="buildslave" rcvar=`set_rcvar` load_rc_config $name : ${buildslave_enable:=NO} : ${buildslave_directory:=/nonexistent} : ${buildslave_user:=buildbot} command="/usr/local/bin/buildslave" command_interpreter="/usr/local/bin/python2.6" pidfile="${buildslave_directory}/twistd.pid" required_dirs="${buildslave_directory}" flags="${buildslave_flags:-"start ${buildslave_directory}"}" stop_cmd="buildslave_stop" buildslave_stop() { info "Stopping ${name}." ${buildslave_program:-$command} stop ${buildslave_directory} } run_rc_command "$1" >Release-Note: >Audit-Trail: >Unformatted: