y-web: introduce y_path_install for yInstaller

Origin commit data
------------------
Branch: ni/coolstream
Commit: 15ddf7a53a
Author: vanhofen <vanhofen@gmx.de>
Date: 2022-10-03 (Mon, 03 Oct 2022)

Origin message was:
------------------
- y-web: introduce y_path_install for yInstaller

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2022-10-03 20:53:32 +02:00
parent 8f797f8b19
commit 7a5b6553b4
2 changed files with 11 additions and 8 deletions

View File

@@ -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 '<html><head>'
echo '<link rel="stylesheet" type="text/css" href="/Y_Main.css">'
@@ -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

View File

@@ -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"