From bb73fdfd63de07bd1d7f01bac66db2eefb77721d Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 3 Oct 2022 20:53:32 +0200 Subject: [PATCH] y-web: introduce y_path_install for yInstaller Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/15ddf7a53abf050f782b2bc6068050311479ae88 Author: vanhofen Date: 2022-10-03 (Mon, 03 Oct 2022) Origin message was: ------------------ - y-web: introduce y_path_install for yInstaller --- data/y-web/scripts/Y_Tools.sh | 16 +++++++++------- data/y-web/scripts/_Y_Globals.sh | 3 ++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/data/y-web/scripts/Y_Tools.sh b/data/y-web/scripts/Y_Tools.sh index 499f053fd..038789aca 100644 --- a/data/y-web/scripts/Y_Tools.sh +++ b/data/y-web/scripts/Y_Tools.sh @@ -283,7 +283,8 @@ do_cmd() # ----------------------------------------------------------- # yInstaller -# un-tar uploaded file to /tmp. Execute included install.sh +# un-tar uploaded file to /tmp/y-install. +# Execute included install.sh. # ----------------------------------------------------------- do_installer() { @@ -295,16 +296,16 @@ do_installer() if [ -s "$y_upload_file" ] then - # unpack /tmp/upload.tmp - cd $y_path_tmp + mkdir -p $y_path_install + cd $y_path_install tar -xf "$y_upload_file" rm $y_upload_file - if [ -s "$y_install" ] #look for install.sh + if [ -s "$y_install" ] # look for install.sh then chmod 755 $y_install o=`$y_install` # execute rm -f $y_install # clean up - if [ -s "$y_out_html" ] #html - output? + if [ -s "$y_out_html" ] # html - output? then echo '' echo '' @@ -345,10 +346,11 @@ do_ext_installer() fi wgetlog=`wget -O $y_upload_file $1 2>&1` if [ -s "$y_upload_file" ];then - cd $y_path_tmp + mkdir -p $y_path_install + cd $y_path_install tar -xf "$y_upload_file" rm $y_upload_file - if [ -s "$y_install" ] #look for install.sh + if [ -s "$y_install" ] # look for install.sh then chmod 755 $y_install o=`$y_install` # execute diff --git a/data/y-web/scripts/_Y_Globals.sh b/data/y-web/scripts/_Y_Globals.sh index 050ce87e0..1e0e9cb31 100644 --- a/data/y-web/scripts/_Y_Globals.sh +++ b/data/y-web/scripts/_Y_Globals.sh @@ -21,6 +21,7 @@ y_path_sbin="/sbin" y_path_usrsbin="/usr/sbin" y_path_config="%(CONFIGDIR)" y_path_tmp="/tmp" +y_path_install="$y_path_tmp/y-install" y_path_zapit="%(ZAPITDIR)" y_url_control="http://localhost/control" @@ -37,4 +38,4 @@ y_tmp_m3u="$y_path_tmp/y.m3u" y_tmp_pls="$y_path_tmp/y.pls" y_out_html="$y_path_tmp/y_out.yhtm" -y_install="$y_path_tmp/install.sh" +y_install="$y_path_install/install.sh"