annotate zbmux.sh @ 26:ca8993488ac5 default tip

Use Python 2.7.
author Daniel O'Connor <darius@dons.net.au>
date Tue, 16 Apr 2013 10:23:29 +0930
parents b0057548801f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
1 #!/bin/sh
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
2 #
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
3
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
4 # PROVIDE: zbmux
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
5 # REQUIRE: LOGIN
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
6 # KEYWORD: shutdown
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
7
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
8 # Add the following line to /etc/rc.conf to enable `zbmux':
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
9 #
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
10 #zbmux_enable="YES"
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
11 #
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
12
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
13 . "/etc/rc.subr"
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
14
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
15 name="zbmux"
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
16 rcvar=`set_rcvar`
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
17
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
18 base="/home/darius/projects/ZigBee"
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
19 command="/usr/local/bin/twistd"
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
20 command_args="-l $base/$name.log --pidfile=$base/$name.pid -y $base/$name.tac"
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
21 pidfile="$base/$name.pid"
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
22 required_files="$base/$name.tac"
26
ca8993488ac5 Use Python 2.7.
Daniel O'Connor <darius@dons.net.au>
parents: 19
diff changeset
23 command_interpreter="/usr/local/bin/python2.7"
19
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
24 zbmux_chdir="$base"
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
25
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
26 # read configuration and set defaults
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
27 load_rc_config "$name"
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
28 : ${zbmux_enable="NO"}
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
29 : ${zbmux_flags=""}
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
30 : ${zbmux_user="darius"}
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
31
b0057548801f Startup script for rc.d
darius@midget.dons.net.au
parents:
diff changeset
32 run_rc_command "$1"