mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +02:00
- yWeb: intensive use of variables
This commit is contained in:
@@ -109,4 +109,3 @@ install-data-hook:
|
||||
-e 's|%(PRIVATE_HTTPDDIR)|$(PRIVATE_HTTPDDIR)|g' \
|
||||
-e 's|%(PUBLIC_HTTPDDIR)|$(PUBLIC_HTTPDDIR)|g' \
|
||||
;
|
||||
|
||||
|
@@ -95,9 +95,9 @@ case "$1" in
|
||||
killall streamts
|
||||
killall streampes
|
||||
killall udpstreamts
|
||||
if [ -e /var/bin/udpstreamts ]
|
||||
if [ -e $y_path_usrbin/udpstreamts ]
|
||||
then
|
||||
/var/bin/udpstreamts $* &
|
||||
$y_path_usrbin/udpstreamts $* &
|
||||
else
|
||||
udpstreamts $* &
|
||||
fi
|
||||
|
@@ -459,7 +459,7 @@ proc()
|
||||
# -----------------------------------------------------------
|
||||
wol()
|
||||
{
|
||||
if [ -e /bin/ether-wake ]; then
|
||||
if [ -e $y_path_bin/ether-wake ]; then
|
||||
msg=`ether-wake $1`
|
||||
fi
|
||||
msg="<b>Wake on LAN $1</b><br><br>$msg"
|
||||
@@ -471,10 +471,10 @@ wol()
|
||||
# -----------------------------------------------------------
|
||||
do_lcshot()
|
||||
{
|
||||
if [ -e "/var/bin/lcshot" ]; then
|
||||
/var/bin/lcshot $*
|
||||
if [ -e "$y_path_usrbin/lcshot" ]; then
|
||||
$y_path_usrbin/lcshot $*
|
||||
else
|
||||
/bin/lcshot $*
|
||||
$y_path_bin/lcshot $*
|
||||
fi
|
||||
}
|
||||
# -----------------------------------------------------------
|
||||
@@ -485,15 +485,15 @@ do_fbshot()
|
||||
{
|
||||
if [ "$1" = "fb" ]; then
|
||||
shift 1
|
||||
if [ -e "/var/bin/fbshot" ]; then
|
||||
/var/bin/fbshot $*
|
||||
if [ -e "$y_path_usrbin/fbshot" ]; then
|
||||
$y_path_usrbin/fbshot $*
|
||||
else
|
||||
fbshot $*
|
||||
fi
|
||||
else
|
||||
shift 1
|
||||
if [ -e "/var/bin/dboxshot" ]; then
|
||||
/var/bin/dboxshot $*
|
||||
if [ -e "$y_path_usrbin/dboxshot" ]; then
|
||||
$y_path_usrbin/dboxshot $*
|
||||
else
|
||||
dboxshot $*
|
||||
fi
|
||||
@@ -525,7 +525,7 @@ do_settings_backup_restore()
|
||||
backup)
|
||||
rm -rf $workdir
|
||||
mkdir -p $workdir
|
||||
/bin/backup.sh $workdir >/dev/null
|
||||
$y_path_bin/backup.sh $workdir >/dev/null
|
||||
filename=$(ls -1 -tr $workdir/settings_* | tail -1)
|
||||
echo "$filename"
|
||||
;;
|
||||
@@ -533,7 +533,7 @@ do_settings_backup_restore()
|
||||
restore)
|
||||
if [ -s "$y_upload_file" ]
|
||||
then
|
||||
msg=$(/bin/restore.sh "$y_upload_file")
|
||||
msg=$($y_path_bin/restore.sh "$y_upload_file")
|
||||
else
|
||||
msg="error: no upload file"
|
||||
fi
|
||||
|
@@ -16,7 +16,9 @@ boxtype="coolstream"
|
||||
#y_path_httpd="%(PRIVATE_HTTPDDIR)"
|
||||
y_path_httpd=".."
|
||||
y_path_scripts="$y_path_httpd/scripts"
|
||||
y_path_bin="/bin"
|
||||
y_path_usrbin="/var/bin"
|
||||
y_path_sbin="/sbin"
|
||||
y_path_config="%(CONFIGDIR)"
|
||||
y_path_tmp="/tmp"
|
||||
y_path_zapit="$y_path_config/zapit"
|
||||
|
@@ -8,8 +8,10 @@
|
||||
API_VERSION_MAJOR="1"
|
||||
API_VERSION_MINOR="0"
|
||||
API_VERSION_TEXT="$API_VERSION_MAJOR.$API_VERSION_MINOR"
|
||||
#path_httpd="%(PRIVATE_HTTPDDIR)"
|
||||
path_httpd=".."
|
||||
path_scripts="$path_httpd/scripts"
|
||||
path_bin="/bin"
|
||||
path_usrbin="/var/bin"
|
||||
path_sbin="/sbin"
|
||||
path_config="%(CONFIGDIR)"
|
||||
@@ -85,6 +87,3 @@ case "$1" in
|
||||
*)
|
||||
echo "[api.sh] Parameter wrong: $*" ;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user