#!/bin/sh
#
# chkconfig: 35 92 12
# description: Quicktime Streaming Media Server
#
# Slight tweak of file create by Larry Underhill 05/20/02
#
# init script to start up the quicktime (Darwin) streaming server
# tested on Redhat 7.2, Fedora Core 4 and CentOS-4.3
# source function library
#. /etc/rc.d/init.d/functions
case "$1" in
start)
if test -r /var/lock/dssd
then
echo "Lockfile /var/lock/dssd exists. Server not started."
failure
else
echo "Starting Darwin Streaming Server: "
/usr/local/sbin/DarwinStreamingServer && touch /var/lock/dssd
echo "Starting DSS Admin Console: "
/usr/local/sbin/streamingadminserver.pl
echo "DSS and DSS Admin Console started…"
fi
;;
stop)
echo "Stopping Darwin Streaming Server: "
[ -f /var/lock/dssd ] || exit 0
echo "stopping…"
killall DarwinStreamingServer && killall streamingadminserver.pl
#ps ax | awk ‘{print $1" " $5}’ | awk ‘/DarwinStreamingServer/ {print $1}’ | xargs -r kill -9 && success || failure
#echo "Stopping DSS Admin Console: "
#ps ax | awk ‘/streamingadminserver.pl/ {print $1}’ | xargs -r kill -9 && success || failure
rm -f /var/lock/dssd
echo
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 [start|stop|restart]"
exit 1
esac
exit 0
步驟二:
chmod +x /etc/init.d/dss
步驟三:設定系統開機時自動載入 DSS
update-rc.d dss defaults
步驟四:手動啟動 Darwin Streaming Server
/etc/init.d/dss start
完成了~
沒有留言:
張貼留言