#!/bin/sh # $FreeBSD$ # # PROVIDE: viewvc # REQUIRE: LOGIN # KEYWORD: shutdown # # Add the following line to /etc/rc.conf to enable ViewVC: # # viewvc_enable="YES" # # optional # viewvc_flags="-h localhost -p PORT" # viewvc_user="www" # # To get aviable parameters and the default values use the # command %%PREFIX%%/viewvc/bin/standalone.py --help # for more info. # # Note: # If you choose a listen port less then 1024 then you have # to use a privileged user. # If the user www can not access your cvs/svn repository # adust the parameter viewvc_user and it should work. # # INFO: # The default port will change with the next release of ViewVC # from 7467 to 49152 # see http://viewvc.tigris.org/issues/show_bug.cgi?id=234 . %%RC_SUBR%% name="viewvc" rcvar=${name}_enable command="%%PREFIX%%/viewvc/bin/standalone.py" # we need this, since our script interpreter is python command_interpreter="%%PREFIX%%/bin/%%PYTHON_VERSION%%" # extra required arguments command_args="2>/dev/null 1>/dev/null &" load_rc_config ${name} viewvc_enable=${viewvc_enable-NO} viewvc_flags=${viewvc_flags-"-p 49152"} viewvc_user=${viewvc_user-www} viewvc_procname=${viewvc_procname-%%PREFIX%%/viewvc/bin/standalone.py} run_rc_command "$1"