view zbmux.sh @ 19:b0057548801f

Startup script for rc.d
author darius@midget.dons.net.au
date Sun, 01 Feb 2009 10:31:27 +1030
parents
children ca8993488ac5
line wrap: on
line source

#!/bin/sh
#

# PROVIDE: zbmux
# REQUIRE: LOGIN
# KEYWORD: shutdown

# Add the following line to /etc/rc.conf to enable `zbmux':
#
#zbmux_enable="YES"
#

. "/etc/rc.subr"

name="zbmux"
rcvar=`set_rcvar`

base="/home/darius/projects/ZigBee"
command="/usr/local/bin/twistd"
command_args="-l $base/$name.log --pidfile=$base/$name.pid -y $base/$name.tac"
pidfile="$base/$name.pid"
required_files="$base/$name.tac"
command_interpreter="/usr/local/bin/python2.5"
zbmux_chdir="$base"

# read configuration and set defaults
load_rc_config "$name"
: ${zbmux_enable="NO"}
: ${zbmux_flags=""}
: ${zbmux_user="darius"}

run_rc_command "$1"