19
|
1 #!/bin/sh
|
|
2 #
|
|
3
|
|
4 # PROVIDE: zbmux
|
|
5 # REQUIRE: LOGIN
|
|
6 # KEYWORD: shutdown
|
|
7
|
|
8 # Add the following line to /etc/rc.conf to enable `zbmux':
|
|
9 #
|
|
10 #zbmux_enable="YES"
|
|
11 #
|
|
12
|
|
13 . "/etc/rc.subr"
|
|
14
|
|
15 name="zbmux"
|
|
16 rcvar=`set_rcvar`
|
|
17
|
|
18 base="/home/darius/projects/ZigBee"
|
|
19 command="/usr/local/bin/twistd"
|
|
20 command_args="-l $base/$name.log --pidfile=$base/$name.pid -y $base/$name.tac"
|
|
21 pidfile="$base/$name.pid"
|
|
22 required_files="$base/$name.tac"
|
|
23 command_interpreter="/usr/local/bin/python2.5"
|
|
24 zbmux_chdir="$base"
|
|
25
|
|
26 # read configuration and set defaults
|
|
27 load_rc_config "$name"
|
|
28 : ${zbmux_enable="NO"}
|
|
29 : ${zbmux_flags=""}
|
|
30 : ${zbmux_user="darius"}
|
|
31
|
|
32 run_rc_command "$1"
|