1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-01 22:05:08 +00:00
freebsd-ports/net/rtsp_proxy/files/rtsp_proxy.sh

21 lines
448 B
Bash
Raw Normal View History

#!/bin/sh
cd `dirname $0`
cd ../..
PREFIX=`pwd`
case $1 in
start) echo -n ' rtsp_proxy'
RTSP_PROXY=${PREFIX}/sbin/rtsp_proxy
CONFIG_FILE=${PREFIX}/etc/qts_proxy.conf
PID_FILE=/var/run/rtsp_proxy.pid
[ -x ${RTSP_PROXY} ] && ${RTSP_PROXY} -c ${CONFIG_FILE} > /dev/null & && echo $! > ${PID_FILE}
;;
stop) if [ -f /var/run/rtsp_proxy.pid ]; then
kill `cat /var/run/rtsp_proxy.pid`
rm /var/run/rtsp_proxy.pid
fi
;;
esac