1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/webmin_ynh.git synced 2024-09-03 20:36:08 +02:00

switch to .deb

This commit is contained in:
yalh76 2022-07-06 03:15:17 +02:00
parent 2685bbcf91
commit 34a445eb6f
5 changed files with 45 additions and 4 deletions

7
conf/app.src Normal file
View file

@ -0,0 +1,7 @@
SOURCE_URL=https://github.com/webmin/webmin/releases/download/1.984/webmin_1.984_all.deb
SOURCE_SUM=cc1e7267c945237e44762c2a8e714e271d8fafc3e8addd238ee3039ae00cb3fd
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=deb
SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=webmin.deb
SOURCE_EXTRACT=false

View file

@ -67,8 +67,18 @@ ynh_script_progression --message="Installing dependencies..."
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
# Install Webmin #=================================================
ynh_install_extra_app_dependencies --repo="deb https://download.webmin.com/download/repository sarge contrib" --package="webmin" --key="https://download.webmin.com/jcameron-key.asc" # DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Setting up source files..."
tempdir="$(mktemp -d)"
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$tempdir"
dpkg --install $tempdir/webmin.deb
ynh_exec_warn_less ynh_secure_remove --file="$tempdir"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION

View file

@ -57,6 +57,7 @@ ynh_script_progression --message="Removing dependencies..."
# Remove metapackage and its dependencies # Remove metapackage and its dependencies
ynh_exec_warn_less ynh_remove_app_dependencies ynh_exec_warn_less ynh_remove_app_dependencies
dpkg --remove $app
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION

View file

@ -42,8 +42,18 @@ ynh_script_progression --message="Reinstalling dependencies..."
# Define and install dependencies # Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
# Install Webmin #=================================================
ynh_install_extra_app_dependencies --repo="deb https://download.webmin.com/download/repository sarge contrib" --package="webmin" --key="https://download.webmin.com/jcameron-key.asc" # DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Setting up source files..."
tempdir="$(mktemp -d)"
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$tempdir"
dpkg --install $tempdir/webmin.deb
ynh_exec_warn_less ynh_secure_remove --file="$tempdir"
#================================================= #=================================================
# RESTORE THE NGINX CONFIGURATION # RESTORE THE NGINX CONFIGURATION

View file

@ -62,6 +62,19 @@ if ! ynh_permission_exists --permission="admin"; then
ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
fi fi
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Setting up source files..."
tempdir="$(mktemp -d)"
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$tempdir"
dpkg --install $tempdir/webmin.deb
ynh_exec_warn_less ynh_secure_remove --file="$tempdir"
#================================================= #=================================================
# UPGRADE DEPENDENCIES # UPGRADE DEPENDENCIES
#================================================= #=================================================