トップ |

2005年09月29日

自動起動スクリプト

#!/bin/sh
#
# dss This script starts or stops Darwin Streaming Server
#
# chkconfig: 2345 99 01
# description: listen to the radio
#
CMD_PS='ps ax -o pid -o command'

case "$1" in
start)
/usr/local/sbin/streamingadminserver.pl
echo -n ' dss'
;;
stop)
$CMD_PS | awk '/DarwinStreamingServer/ {print $1}' | grep -v grep | xargs kill -9
$CMD_PS | awk '/streamingadminserver.pl/ {print $1}' | grep -v grep | xargs kill -9
;;
*)
echo "Usage : `basename $0` {start|stop}" >&2
exit 64
;;
esac

exit 0

サーバ再起動後に、自動で Darwin Streaming Server が起動するよう、上記自動起動スクリプトを dss の名前で作成しました。スクリプト自体は、研究員・寺元のサイト‐Darwin Streaming Server のインストールに記載のものを使わさせて頂きました。

# vi /etc/rc.d/init.d/dss

自動起動スクリプトに実行権限を与える

# chmod 755 /etc/rc.d/init.d/dss

サービスの登録を行う

# chkconfig --add dss

サービスを起動する

# /etc/rc.d/init.d/dss start

自動起動設定

# chkconfig dss on

自動起動設定確認

# chkconfig --list dss

投稿者 ゆう : 2005年09月29日 14:40 | カテゴリー Streaming Server (9)

トラックバック

このエントリーのトラックバックURL:
http://www.wave440.com/blog/mt-trbk.cgi/101

コメントを投稿




保存しますか?