]> git.pld-linux.org Git - packages/flixengine.git/commitdiff
- raw from install
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 13 Dec 2006 16:46:47 +0000 (16:46 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    flixengine.init -> 1.1

flixengine.init [new file with mode: 0644]

diff --git a/flixengine.init b/flixengine.init
new file mode 100644 (file)
index 0000000..8f8f5bd
--- /dev/null
@@ -0,0 +1,81 @@
+#!/bin/bash
+
+# On2 Technologies Flix Engine init script
+# Website: www.on2.com
+# Support: flixsupport@on2.com
+
+#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
This page took 0.270804 seconds and 4 git commands to generate.