7 # description: On2 Technologies Flix Engine init script
10 # Source function library
11 . /etc/rc.d/init.d/functions
13 ## Specify the mencoder binary for flixd to use when decoding source files.
14 ## If running flixd from the command line or using su within this script to run
15 ## it as another user ensure that this environment variable is set. The default
16 ## install path for mencoder will not be in PATH so without this variable set
17 ## flixd will be unable to decode source files.
18 export FLIXD_MENCODER=/usr/bin/mencoder-flixengine
25 if [ ! -f /var/lock/subsys/portmap ]; then
26 echo >&2 "ERROR: portmap does not appear to be running."
27 echo >&2 "Flix Engine requires the portmap service to run."
30 # test for running portmapper
34 # Check if the service is already running?
35 if [ ! -f /var/lock/subsys/flixd ]; then
37 msg_starting "Flix Engine"
38 /usr/sbin/flixd --authdir=$AUTHDIR \
39 --interface=$INTERFACE --port=$PORT \
40 --pidfile /var/run/flixd.pid --logfile=/var/log/flixd.log
42 if [ $RETVAL = 0 ]; then
43 touch /var/lock/subsys/flixd
49 msg_already_running "Flix Engine"
55 if [ -f /var/lock/subsys/flixd ]; then
56 msg_stopping "Flix Engine"
57 killproc --pidfile flixd.pid flixd
58 rm -f /var/lock/subsys/flixd
60 msg_not_running "Flix Engine"
65 # See how we were called.
83 msg_usage "$0 {start|stop|restart|status}"