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

Fix change_url

This commit is contained in:
ericgaspar 2021-02-07 16:17:24 +01:00
parent 3a5adec2b9
commit 4665ebe3a4
No known key found for this signature in database
GPG key ID: 574F281483054D44
5 changed files with 14 additions and 32 deletions

View file

@ -28,11 +28,7 @@ ynh_script_progression --message="Loading installation settings..."
# Needed for helper "ynh_add_nginx_config"
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
# Add settings here as needed by your application
#db_name=$(ynh_app_setting_get --app=$app --key=db_name)
#db_user=$db_name
#db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
port=$(ynh_app_setting_get --app=$app --key=port)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP

View file

@ -179,13 +179,14 @@ ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --lin
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring SSOwat..."
ynh_script_progression --message="Configuring permissions..."
# 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="/"
# Everyone can access the app.
# The "main" permission is automatically created before the install script.
ynh_permission_update --permission="main" --add="visitors"
fi
#=================================================

View file

@ -77,16 +77,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..."
# Remove the dedicated NGINX config
ynh_remove_nginx_config
#=================================================
# CLOSE A PORT
#=================================================
if yunohost firewall list | grep -q "\- $port$"
then
ynh_script_progression --message="Closing port $port..."
ynh_exec_warn_less yunohost firewall disallow TCP $port
fi
#=================================================
# SPECIFIC REMOVE
#=================================================

View file

@ -120,7 +120,7 @@ yunohost service add $app --description="$app daemon for Wiki.js" --log="/var/lo
#=================================================
ynh_script_progression --message="Starting a systemd service..."
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="HTTP Server:"
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="HTTP Server:"
#=================================================
# CREATE LDAP USER

View file

@ -71,6 +71,13 @@ if [[ -z "$ldap_user" ]]; then
yunohost user create $ldap_user --firstname "SvcWikijsLdap" --lastname "SvcWikijsLdap" --mail ${ldap_user}@$domain --password $ldap_password -q 0
fi
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
# Remove yarn repository
ynh_secure_remove --file="/etc/apt/sources.list.d/yarn.list"
@ -203,7 +210,7 @@ ynh_add_systemd_config --others_var="ynh_node ynh_node_load_PATH"
ynh_script_progression --message="Securing files and directories..."
# Set permissions on app files
chown -R "$app":"$app" "$final_path"
chown -R $app: "$final_path"
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
@ -212,18 +219,6 @@ ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description="$app daemon for Wiki.js" --log="/var/log/$app/$app.log"
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Upgrading SSOwat configuration..."
# 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="/"
fi
#=================================================
# START SYSTEMD SERVICE
#=================================================