mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-02 10:21:10 +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
|
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:
|
install-data-hook:
|
||||||
chmod 0755 $(DATADIR)/neutrino/httpd/scripts/api.sh
|
chmod 0755 $(DATADIR)/neutrino/httpd/scripts/api.sh
|
||||||
|
@@ -11,14 +11,18 @@
|
|||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
live_lock()
|
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
|
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/rc?lock" >/dev/null
|
||||||
call_webserver "control/zapto?stopplayback" >/dev/null
|
call_webserver "control/zapto?stopplayback" >/dev/null
|
||||||
}
|
}
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
live_unlock()
|
live_unlock()
|
||||||
{
|
{
|
||||||
|
if [ "$boxtype" != "coolstream" ]; then
|
||||||
call_webserver "control/lcd?lock=0" >/dev/null
|
call_webserver "control/lcd?lock=0" >/dev/null
|
||||||
|
fi
|
||||||
call_webserver "control/rc?unlock" >/dev/null
|
call_webserver "control/rc?unlock" >/dev/null
|
||||||
call_webserver "control/zapto?startplayback" >/dev/null
|
call_webserver "control/zapto?startplayback" >/dev/null
|
||||||
}
|
}
|
||||||
@@ -26,13 +30,17 @@ live_unlock()
|
|||||||
prepare_tv()
|
prepare_tv()
|
||||||
{
|
{
|
||||||
# SPTS on
|
# SPTS on
|
||||||
|
if [ "$boxtype" != "coolstream" ]; then
|
||||||
call_webserver "control/system?setAViAExtPlayBack=spts" >/dev/null
|
call_webserver "control/system?setAViAExtPlayBack=spts" >/dev/null
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
prepare_radio()
|
prepare_radio()
|
||||||
{
|
{
|
||||||
# SPTS off
|
# SPTS off
|
||||||
|
if [ "$boxtype" != "coolstream" ]; then
|
||||||
call_webserver "control/system?setAViAExtPlayBack=pes" >/dev/null
|
call_webserver "control/system?setAViAExtPlayBack=pes" >/dev/null
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
@@ -108,7 +116,7 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Parameter falsch: $*" ;;
|
echo "Parameter wrong: $*" ;;
|
||||||
esac
|
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
|
# Settings : Skins
|
||||||
# ===========================================================
|
# ===========================================================
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
# Skin Liste
|
# Skin List [Function inactive]
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
skin_get()
|
skin_get()
|
||||||
{
|
{
|
||||||
@@ -33,7 +33,7 @@ skin_get()
|
|||||||
echo "$html_option_list"
|
echo "$html_option_list"
|
||||||
}
|
}
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
# Skin setzen : css ueberschreiben $1=Skin-Name
|
# Set Skin: override css $1=Skin-Name [Function inactive]
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
skin_set()
|
skin_set()
|
||||||
{
|
{
|
||||||
@@ -167,14 +167,14 @@ upload_copy()
|
|||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
bootlogo_upload()
|
bootlogo_upload()
|
||||||
{
|
{
|
||||||
msg="Boot-Logo neu gesetzt"
|
msg="Boot-Logo installed"
|
||||||
upload_copy "$y_boot_logo"
|
upload_copy "$y_boot_logo"
|
||||||
y_format_message_html
|
y_format_message_html
|
||||||
}
|
}
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
bootlogo_lcd_upload()
|
bootlogo_lcd_upload()
|
||||||
{
|
{
|
||||||
msg="Boot-Logo-LCD neu gesetzt"
|
msg="Boot-Logo-LCD installed"
|
||||||
upload_copy "$y_boot_logo_lcd"
|
upload_copy "$y_boot_logo_lcd"
|
||||||
y_format_message_html
|
y_format_message_html
|
||||||
}
|
}
|
||||||
@@ -267,7 +267,7 @@ do_unmount()
|
|||||||
}
|
}
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
# AutoMount
|
# AutoMount
|
||||||
# deaktive mount "#" replaces "---" and "=" replaced ",,"
|
# deactivate mount "#" replaces "---" and "=" replaced ",,"
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
do_automount_list()
|
do_automount_list()
|
||||||
{
|
{
|
||||||
@@ -282,12 +282,15 @@ do_automount_list()
|
|||||||
i=`expr $i + 1`
|
i=`expr $i + 1`
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
# -----------------------------------------------------------
|
||||||
do_automount_getline()
|
do_automount_getline()
|
||||||
{
|
{
|
||||||
mountname=`echo "$2"|sed -e "s/---/#/g"`
|
mountname=`echo "$2"|sed -e "s/---/#/g"`
|
||||||
cat $1|sed -n "/^[#]*$mountname[^a-zA-Z0-9]/p"
|
cat $1|sed -n "/^[#]*$mountname[^a-zA-Z0-9]/p"
|
||||||
}
|
}
|
||||||
|
# -----------------------------------------------------------
|
||||||
# $1:filename, $2:mountname, $3-*:mountstring
|
# $1:filename, $2:mountname, $3-*:mountstring
|
||||||
|
# -----------------------------------------------------------
|
||||||
do_automount_setline()
|
do_automount_setline()
|
||||||
{
|
{
|
||||||
if ! [ -e $1 ]; then
|
if ! [ -e $1 ]; then
|
||||||
@@ -575,6 +578,7 @@ case "$1" in
|
|||||||
automount_setline) shift 1; do_automount_setline $* ;;
|
automount_setline) shift 1; do_automount_setline $* ;;
|
||||||
restart_neutrino) restart_neutrino ;;
|
restart_neutrino) restart_neutrino ;;
|
||||||
have_plugin_scripts) find /var/tuxbox/plugins -name '*.sh' ;;
|
have_plugin_scripts) find /var/tuxbox/plugins -name '*.sh' ;;
|
||||||
|
|
||||||
timer_get_tvinfo)
|
timer_get_tvinfo)
|
||||||
shift 1
|
shift 1
|
||||||
rm -r /tmp/tvinfo.xml
|
rm -r /tmp/tvinfo.xml
|
||||||
@@ -646,7 +650,7 @@ case "$1" in
|
|||||||
df /tmp|grep /tmp
|
df /tmp|grep /tmp
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "[Y_Tools.sh] Parameter falsch: $*" ;;
|
echo "[Y_Tools.sh] Parameter wrong: $*" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
@@ -5,6 +5,11 @@
|
|||||||
# $Revision$
|
# $Revision$
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
|
|
||||||
|
# -----------------------------------------------------------
|
||||||
|
# Definitions
|
||||||
|
# -----------------------------------------------------------
|
||||||
|
boxtype="coolstream"
|
||||||
|
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
# Pathes
|
# Pathes
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user