Author: glen                         Date: Wed Dec 13 16:46:53 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- raw from install

---- Files affected:
SOURCES:
   flixengine.init (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/flixengine.init
diff -u /dev/null SOURCES/flixengine.init:1.1
--- /dev/null   Wed Dec 13 17:46:53 2006
+++ SOURCES/flixengine.init     Wed Dec 13 17:46:47 2006
@@ -0,0 +1,81 @@
+#!/bin/bash
+
+# On2 Technologies Flix Engine init script
+# Website: www.on2.com
+# Support: [EMAIL PROTECTED]
+
+#set some variables
+export 
PATH=/home/glen/tmp/flixengine-8.0.7.0-root-glen/usr/sbin:/home/glen/tmp/flixengine-8.0.7.0-root-glen/usr/libexec/on2/flixengine:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH
+export 
LD_LIBRARY_PATH=/home/glen/tmp/flixengine-8.0.7.0-root-glen/usr/lib:/home/glen/tmp/flixengine-8.0.7.0-root-glen/usr/lib:/lib:/usr/lib:/usr/local/lib:$LIBRARY_PATH
+export 
C_INCLUDE_PATH=/home/glen/tmp/flixengine-8.0.7.0-root-glen/usr/include:/usr/include:/usr/local/include:$C_INCLUDE_PATH
+##Specify the mencoder binary for flixd to use when decoding source files.
+##If running flixd from the command line or using su within this script to run
+##it as another user ensure that this environment variable is set. The default
+##install path for mencoder will not be in PATH so without this variable set
+##flixd will be unable to decode source files.
+export 
FLIXD_MENCODER=/home/glen/tmp/flixengine-8.0.7.0-root-glen/usr/libexec/on2/flixengine/mencoder
+
+# test for running portmapper
+if ! rpcinfo -p 1>/dev/null 2>&1; then
+       echo "WARNING: portmap does not appear to be running."
+       echo "Flix Engine requires the portmap service to run."
+       if [ -e /etc/rc.d/rc.portmap ];then
+               if [ ! -x /etc/rc.d/rc.portmap ]; then
+                       echo "/etc/rc.d/rc.portmap not executable. Try chmod 
755 /etc/rc.d/rc.portmap"
+                       echo "and then run /etc/rc.d/rc.portmap"
+                       exit
+               fi
+       fi
+       sysvstart=`ls /etc/rc3.d/*portmap 2>/dev/null`
+       if [ "$sysvstart" != "" ]; then
+               echo "Found $sysvstart."
+               echo "This needs to be setup to execute on startup."
+               exit
+       fi
+
+       echo "If portmap is not installed you must install it first.  See your 
distro documentation."
+       exit
+fi
+
+fstart(){
+       /home/glen/tmp/flixengine-8.0.7.0-root-glen/usr/sbin/flixd 
--authdir=/home/glen/.on2 --pidfile 
/home/glen/tmp/flixengine-8.0.7.0-root-glen/usr/var/run/flixd.pid     
+       if [ "$?" = "0" ]; then
+               echo "Started Flix Engine."
+               return 0
+       else
+               echo "Problem starting Flix Engine."
+               return 1
+       fi
+}
+
+fstop(){
+       if [ ! -e 
/home/glen/tmp/flixengine-8.0.7.0-root-glen/usr/var/run/flixd.pid ]; then
+               echo "PID file 
/home/glen/tmp/flixengine-8.0.7.0-root-glen/usr/var/run/flixd.pid not found."
+               if [ "$1" = "restart" ]; then
+                       echo "Still attempting to restart service."
+               else
+                       exit
+               fi
+       else
+               kill `cat 
/home/glen/tmp/flixengine-8.0.7.0-root-glen/usr/var/run/flixd.pid`
+               if [ "$?" = "0" ]; then 
+                       echo "Stopped Flix Engine"
+               fi
+       fi
+}
+case $1 in
+        start)
+               fstart
+                ;;
+        stop)
+               fstop
+                ;;
+        restart)
+               fstop
+                sleep 1
+               fstart
+                ;;
+        *)
+                echo "Usage $0 (stop/start/restart)"
+                ;;
+esac
================================================================
_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to