yWeb 2.8.a.3 Alpha-Version

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@406 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
yjogol
2010-02-24 16:16:10 +00:00
parent 24c8d684c9
commit 32c7517141
191 changed files with 8063 additions and 4185 deletions

View File

@@ -1,37 +1,57 @@
#!/bin/sh
# -----------------------------------------------------------
# API Script (yjogol)
# $Date: 2007/02/21 17:41:04 $
# $Revision: 1.1 $
# for yWeb independent shell calls
# $Date: 2007/11/26 20:54:55 $
# $Revision: 1.3 $
# -----------------------------------------------------------
API_VERSION_MAJOR="1"
API_VERSION_MINOR="0"
API_VERSION_TEXT="$API_VERSION_MAJOR.$API_VERSION_MINOR"
path_httpd=".."
path_scripts="$path_httpd/scripts"
path_usrbin="/var/bin"
path_sbin="/sbin"
path_config="/var/tuxbox/config"
path_tmp="/tmp"
streaming_client_status="$path_tmp/streaming_client"
# -----------------------------------------------------------
# udp control for neutrinoTV and yWeb LiveTV
do_udp_stream()
{
echo "para: $*"
up="no"
if [ -e /var/bin/udpstreamts ]; then
up="/var/bin/udpstreamts"
if [ -e $path_usrbin/udpstreamts ]; then
up="$path_usrbin/udpstreamts"
else
up="udpstreamts"
if [ -e $path_sbin/udpstreamts ]; then
up="$path_sbin/udpstreamts"
fi
fi
case "$1" in
installed)
echo "$up" ;;
echo "$up" ;;
start)
shift 1
killall streamts
killall streampes
killall udpstreamts
echo $* > $streaming_client_status
trap "" 1;$up $* &
;;
stop)
killall udpstreamts ;;
killall udpstreamts
rm $streaming_client_status
echo "ok"
;;
kill_all_streams)
killall streamts
killall streampes
killall udpstreamts
rm $streaming_client_status
echo "ok"
;;
esac
}
# -----------------------------------------------------------
@@ -39,12 +59,29 @@ echo "para: $*"
# -----------------------------------------------------------
case "$1" in
version)
echo '$Revision: 1.1 $' ;;
echo $API_VERSION_TEXT ;;
udp_stream)
shift 1
do_udp_stream $*
;;
streaming_status)
if [ -e $streaming_client_status ]; then
cat $streaming_client_status
else
echo "Streams: "
ps | grep stream | grep -v grep | grep -v sh | cut -d " " -f 15
fi
;;
streaming_lock)
shift 1
echo $* > $streaming_client_status # first parameter should always be the ip of the client
echo "ok"
;;
streaming_unlock)
rm $streaming_client_status
echo "ok"
;;
*)
echo "[api.sh] Parameter wrong: $*" ;;
esac