RTMP commandline, sigpipe signal catching, and init script changes
This commit is contained in:
parent
47370e9621
commit
d43d041d5e
2 changed files with 46 additions and 37 deletions
|
|
@ -1,32 +1,22 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# chkconfig: 345 92 8
|
||||
# description: DDVTech RTMP Connector
|
||||
#
|
||||
# processname: Connector_RTMP
|
||||
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
prog="Connector_RTMP"
|
||||
fullprog="/usr/bin/Connector_RTMP"
|
||||
RETVAL=0
|
||||
|
||||
start() {
|
||||
gprintf "Starting %s: " $prog
|
||||
daemon --user=root $fullprog
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
|
||||
return $RETVAL
|
||||
echo "Starting $prog"
|
||||
$fullprog
|
||||
return $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
gprintf "Stopping %s: " $prog
|
||||
killproc $fullprog
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
|
||||
return $RETVAL
|
||||
echo "Stopping $prog"
|
||||
killall $prog
|
||||
return $?
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
|
|
@ -40,18 +30,8 @@ case "$1" in
|
|||
stop
|
||||
start
|
||||
;;
|
||||
condrestart)
|
||||
if [ -f /var/lock/subsys/$prog ]; then
|
||||
stop
|
||||
start
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
status $fullprog
|
||||
RETVAL=$?
|
||||
;;
|
||||
*)
|
||||
gprintf "Usage: %s {start|stop|restart|status}" $0
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
RETVAL=1
|
||||
esac
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue