y-web: introduce y_path_install for yInstaller

Origin commit data
------------------
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
This commit is contained in:
vanhofen
2022-10-03 20:53:32 +02:00
parent 44c4d99ce9
commit bb73fdfd63
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