From bdf0998b6c2ea1992dee4eb1984caee0775d0ad5 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 10 Oct 2020 14:22:02 +0200 Subject: [PATCH] from source --- README.md | 4 ++++ conf/app.src | 7 +++++++ scripts/install | 33 +++++++++++++++++++++++++++++++-- 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 conf/app.src diff --git a/README.md b/README.md index 248e376..911ed2f 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,10 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in **Shipped version:** 1.955 +## Screenshots + +![](https://raw.githubusercontent.com/webmin-devel/webmin/master/media/webmin-demo-basic.gif) + ## Important points - Only **root** (system user) can connect diff --git a/conf/app.src b/conf/app.src new file mode 100644 index 0000000..ea1a958 --- /dev/null +++ b/conf/app.src @@ -0,0 +1,7 @@ +SOURCE_URL=https://github.com/webmin/webmin/archive/1.955.tar.gz +SOURCE_SUM=19677b5e742351958f7ad2dde4512a18e68b8f8b1a0369a122f46f39f7e4a7f8 +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=tar.gz +SOURCE_IN_SUBDIR=true +SOURCE_FILENAME= +SOURCE_EXTRACT=true \ No newline at end of file diff --git a/scripts/install b/scripts/install index f0ce902..21c9565 100644 --- a/scripts/install +++ b/scripts/install @@ -34,6 +34,9 @@ app=$YNH_APP_INSTANCE_NAME #================================================= ynh_script_progression --message="Validating installation parameters..." --weight=1 +final_path=/var/www/$app +test ! -e "$final_path" || ynh_die --message="This path already contains a folder" + # Register (book) web path ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url @@ -68,9 +71,18 @@ ynh_install_app_dependencies $pkg_dependencies #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." --weight=12 +# ynh_script_progression --message="Setting up source files..." --weight=12 -ynh_install_extra_app_dependencies --repo="deb http://download.webmin.com/download/repository sarge contrib" --package="webmin" --key="http://www.webmin.com/jcameron-key.asc" +# ynh_install_extra_app_dependencies --repo="deb http://download.webmin.com/download/repository sarge contrib" --package="webmin" --key="http://www.webmin.com/jcameron-key.asc" + +#================================================= +# DOWNLOAD, CHECK AND UNPACK SOURCE +#================================================= +ynh_script_progression --message="Setting up source files..." --time --weight=1 + +ynh_app_setting_set --app=$app --key=final_path --value=$final_path +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$final_path" #================================================= # NGINX CONFIGURATION @@ -80,6 +92,23 @@ ynh_script_progression --message="Configuring nginx web server..." --weight=11 # Create a dedicated nginx config ynh_add_nginx_config +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." --time --weight=1 + +# Create a system user +ynh_system_user_create --username=$app + +#============================================== +# INSTALL CODIMD +#============================================== +ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=10 + +pushd "$final_path" || ynh_die + setup.sh +popd || ynh_die + #================================================= # MODIFY A CONFIG FILE #=================================================