1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/collabora_ynh.git synced 2024-09-03 18:16:25 +02:00

Add permissions

This commit is contained in:
ericgaspar 2021-02-04 12:44:49 +01:00
parent f5094e9c36
commit 69e2ac84b0
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 34 additions and 8 deletions

View file

@ -88,8 +88,12 @@ ynh_script_progression --message="Configuring NGINX web server..."
ynh_add_nginx_config
#=================================================
# SPECIFIC SETUP
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description="LibreOffice-based online office suite" --log="/var/log/$app/$app.log"
#=================================================
# GENERIC FINALIZATION
#=================================================
@ -104,11 +108,11 @@ ynh_systemd_action --service_name="loolwsd" --action="restart" --log_path="syste
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring SSOwat..."
ynh_script_progression --message="Configuring permissions..."
# Make app public
# unprotected_uris allows SSO credentials to be passed anyway.
ynh_app_setting_set $app unprotected_uris "/"
ynh_permission_update --permission="main" --add="visitors" --show_tile="false"
#=================================================
# RELOAD NGINX

View file

@ -21,6 +21,17 @@ port=$(ynh_app_setting_get --app=$app --key=port)
#=================================================
# STANDARD REMOVE
#=================================================
# REMOVE SERVICE INTEGRATION IN YUNOHOST
#=================================================
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status $app >/dev/null
then
ynh_script_progression --message="Removing $app service integration..."
yunohost service remove $app
fi
#=================================================
# REMOVE DEPENDENCIES
#=================================================

View file

@ -63,6 +63,13 @@ ynh_script_progression --message="Restoring the configuration..."
ynh_restore_file --origin_path="/etc/loolwsd/loolwsd.xml"
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description="LibreOffice-based online office suite" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE
#=================================================

View file

@ -42,6 +42,12 @@ if [ -z "$path_url" ]; then
ynh_app_setting_set --app=$app --key=path_url --value=$path_url
fi
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
@ -94,13 +100,11 @@ ynh_add_config "../conf/loolwsd.xml" "/etc/loolwsd/loolwsd.xml"
#=================================================
# GENERIC FINALIZATION
#=================================================
# SETUP SSOWAT
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Upgrading SSOwat configuration..."
ynh_script_progression --message="Integrating service in YunoHost..."
# Make app public
# unprotected_uris allows SSO credentials to be passed anyway
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
yunohost service add $app --description="LibreOffice-based online office suite" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE