mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-02 02:11:11 +02:00
yweb: minor shell script changes for CS (ybug 444)
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@451 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
installdir = $(DATADIR)/neutrino/httpd/scripts
|
||||
|
||||
install_DATA= api.sh _Y_Globals.sh _Y_Library.sh Y_Live.sh Y_Plugins.sh Y_Tools.sh
|
||||
install_DATA= api.sh _Y_Globals.sh _Y_Library.sh Y_Live.sh Y_Tools.sh
|
||||
|
||||
install-data-hook:
|
||||
chmod 0755 $(DATADIR)/neutrino/httpd/scripts/api.sh
|
||||
|
@@ -11,14 +11,18 @@
|
||||
# -----------------------------------------------------------
|
||||
live_lock()
|
||||
{
|
||||
if [ "$boxtype" != "coolstream" ]; then
|
||||
call_webserver "control/lcd?lock=1&clear=1&rect=10,10,110,50,1,0&xpos=20&ypos=27&size=22&font=2&text=%20%20%20%20yWeb%0A%20%20LiveView&update=1" >/dev/null
|
||||
fi
|
||||
call_webserver "control/rc?lock" >/dev/null
|
||||
call_webserver "control/zapto?stopplayback" >/dev/null
|
||||
}
|
||||
# -----------------------------------------------------------
|
||||
live_unlock()
|
||||
{
|
||||
if [ "$boxtype" != "coolstream" ]; then
|
||||
call_webserver "control/lcd?lock=0" >/dev/null
|
||||
fi
|
||||
call_webserver "control/rc?unlock" >/dev/null
|
||||
call_webserver "control/zapto?startplayback" >/dev/null
|
||||
}
|
||||
@@ -26,13 +30,17 @@ live_unlock()
|
||||
prepare_tv()
|
||||
{
|
||||
# SPTS on
|
||||
if [ "$boxtype" != "coolstream" ]; then
|
||||
call_webserver "control/system?setAViAExtPlayBack=spts" >/dev/null
|
||||
fi
|
||||
}
|
||||
# -----------------------------------------------------------
|
||||
prepare_radio()
|
||||
{
|
||||
# SPTS off
|
||||
if [ "$boxtype" != "coolstream" ]; then
|
||||
call_webserver "control/system?setAViAExtPlayBack=pes" >/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
# -----------------------------------
|
||||
@@ -108,7 +116,7 @@ case "$1" in
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Parameter falsch: $*" ;;
|
||||
echo "Parameter wrong: $*" ;;
|
||||
esac
|
||||
|
||||
|
||||
|
@@ -1,70 +0,0 @@
|
||||
#!/bin/sh
|
||||
# -----------------------------------------------------------
|
||||
# Plugins (yjogol)
|
||||
# $Date$
|
||||
# $Revision$
|
||||
# -----------------------------------------------------------
|
||||
|
||||
. ./_Y_Globals.sh
|
||||
. ./_Y_Library.sh
|
||||
|
||||
# ===========================================================
|
||||
# Settings : Skins
|
||||
# ===========================================================
|
||||
# -----------------------------------------------------------
|
||||
# Skin Liste
|
||||
# -----------------------------------------------------------
|
||||
skin_get()
|
||||
{
|
||||
check_Y_Web_conf
|
||||
active_skin=`config_get_value_direct $y_config_Y_Web 'skin'`
|
||||
html_option_list=""
|
||||
skin_list=`find $y_path_httpd -name 'Y_Main-*'`
|
||||
for f in $skin_list
|
||||
do
|
||||
skin=`echo "$f"|sed -e s/^.*Y_Main-//g|sed -e s/.css//g`
|
||||
if [ "$skin" = "$active_skin" ]
|
||||
then
|
||||
selec="selected"
|
||||
else
|
||||
selec=""
|
||||
fi
|
||||
opt="<option $selec value='$skin'>$skin</option>"
|
||||
html_option_list="$html_option_list $opt"
|
||||
done
|
||||
echo "$html_option_list"
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------
|
||||
# Skin setzen : css ueberschreiben $1=Skin-Name
|
||||
# -----------------------------------------------------------
|
||||
skin_set()
|
||||
{
|
||||
cd $y_path_httpd
|
||||
cp Y_Main-$1.css Y_Main.css
|
||||
if [ -e global-$1.css ]
|
||||
then
|
||||
cp global-$1.css global.css
|
||||
else
|
||||
cp global-Standard.css global.css
|
||||
fi
|
||||
config_set_value_direct $y_config_Y_Web 'skin' $1
|
||||
|
||||
msg="Skin changed - Now browsers Refresh/actualization explain"
|
||||
y_format_message_html
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------
|
||||
# Main
|
||||
# -----------------------------------------------------------
|
||||
|
||||
case "$1" in
|
||||
skin_set)
|
||||
skin_set $2 ;;
|
||||
|
||||
skin_get)
|
||||
skin_get ;;
|
||||
*)
|
||||
echo "Parameter falsch: $*" ;;
|
||||
esac
|
||||
|
@@ -10,7 +10,7 @@
|
||||
# Settings : Skins
|
||||
# ===========================================================
|
||||
# -----------------------------------------------------------
|
||||
# Skin Liste
|
||||
# Skin List [Function inactive]
|
||||
# -----------------------------------------------------------
|
||||
skin_get()
|
||||
{
|
||||
@@ -33,7 +33,7 @@ skin_get()
|
||||
echo "$html_option_list"
|
||||
}
|
||||
# -----------------------------------------------------------
|
||||
# Skin setzen : css ueberschreiben $1=Skin-Name
|
||||
# Set Skin: override css $1=Skin-Name [Function inactive]
|
||||
# -----------------------------------------------------------
|
||||
skin_set()
|
||||
{
|
||||
@@ -167,14 +167,14 @@ upload_copy()
|
||||
# -----------------------------------------------------------
|
||||
bootlogo_upload()
|
||||
{
|
||||
msg="Boot-Logo neu gesetzt"
|
||||
msg="Boot-Logo installed"
|
||||
upload_copy "$y_boot_logo"
|
||||
y_format_message_html
|
||||
}
|
||||
# -----------------------------------------------------------
|
||||
bootlogo_lcd_upload()
|
||||
{
|
||||
msg="Boot-Logo-LCD neu gesetzt"
|
||||
msg="Boot-Logo-LCD installed"
|
||||
upload_copy "$y_boot_logo_lcd"
|
||||
y_format_message_html
|
||||
}
|
||||
@@ -267,7 +267,7 @@ do_unmount()
|
||||
}
|
||||
# -----------------------------------------------------------
|
||||
# AutoMount
|
||||
# deaktive mount "#" replaces "---" and "=" replaced ",,"
|
||||
# deactivate mount "#" replaces "---" and "=" replaced ",,"
|
||||
# -----------------------------------------------------------
|
||||
do_automount_list()
|
||||
{
|
||||
@@ -282,12 +282,15 @@ do_automount_list()
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
}
|
||||
# -----------------------------------------------------------
|
||||
do_automount_getline()
|
||||
{
|
||||
mountname=`echo "$2"|sed -e "s/---/#/g"`
|
||||
cat $1|sed -n "/^[#]*$mountname[^a-zA-Z0-9]/p"
|
||||
}
|
||||
# -----------------------------------------------------------
|
||||
# $1:filename, $2:mountname, $3-*:mountstring
|
||||
# -----------------------------------------------------------
|
||||
do_automount_setline()
|
||||
{
|
||||
if ! [ -e $1 ]; then
|
||||
@@ -575,6 +578,7 @@ case "$1" in
|
||||
automount_setline) shift 1; do_automount_setline $* ;;
|
||||
restart_neutrino) restart_neutrino ;;
|
||||
have_plugin_scripts) find /var/tuxbox/plugins -name '*.sh' ;;
|
||||
|
||||
timer_get_tvinfo)
|
||||
shift 1
|
||||
rm -r /tmp/tvinfo.xml
|
||||
@@ -646,7 +650,7 @@ case "$1" in
|
||||
df /tmp|grep /tmp
|
||||
;;
|
||||
*)
|
||||
echo "[Y_Tools.sh] Parameter falsch: $*" ;;
|
||||
echo "[Y_Tools.sh] Parameter wrong: $*" ;;
|
||||
esac
|
||||
|
||||
|
||||
|
@@ -5,6 +5,11 @@
|
||||
# $Revision$
|
||||
# -----------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------
|
||||
# Definitions
|
||||
# -----------------------------------------------------------
|
||||
boxtype="coolstream"
|
||||
|
||||
# -----------------------------------------------------------
|
||||
# Pathes
|
||||
# -----------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user