1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/webmin_ynh.git synced 2024-09-03 20:36:08 +02:00
This commit is contained in:
ericgaspar 2020-10-10 15:18:10 +02:00
parent d568896c24
commit 14bb4a48ed
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 19 additions and 7 deletions

View file

@ -6,7 +6,7 @@
;; Test complet
; Manifest
domain="domain.tld" (DOMAIN)
admin="john" (USER)
admin="john" (USER)
; Checks
pkg_linter=1
setup_sub_dir=0
@ -17,9 +17,8 @@
upgrade=1
backup_restore=0
multi_instance=0
# This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version.
# incorrect_path=1
port_already_use=1
incorrect_path=0
port_already_use=0
change_url=0
;;; Levels
# If the level 5 (Package linter) is forced to 1. Please add justifications here.

View file

@ -103,7 +103,11 @@ ynh_store_file_checksum --file="/etc/webmin/miniserv.conf"
ynh_script_progression --message="Configuring SSOwat..." --weight=1
# Restrict access to admin only
yunohost app addaccess --users=$admin $app
# yunohost app addaccess --users=$admin $app
if ! ynh_permission_exists --permission "admin"; then
ynh_permission_create --permission "admin" --url "/admin" --allowed $admin
fi
#=================================================
# START SYSTEMD SERVICE

View file

@ -30,7 +30,7 @@ upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1
ynh_script_progression --message="Backing up Webmin before upgrading (may take a while)..." --weight=3
# Backup the current version of the app
ynh_backup_before_upgrade
@ -88,8 +88,17 @@ ynh_store_file_checksum "/etc/webmin/miniserv.conf"
#=================================================
# Restrict access to admin only
yunohost app addaccess --users=$admin $app
# yunohost app addaccess --users=$admin $app
# #Make app public if necessary
# if [ $is_public -eq 1 ]
# then
# # unprotected_uris allows SSO credentials to be passed anyway
# ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
# Create the admin permission if needed
if ! ynh_permission_exists --permission "admin"; then
ynh_permission_create --permission "admin" --url "/admin" --allowed $admin
fi
#=================================================
# START SYSTEMD SERVICE
#=================================================