mirror of
https://github.com/YunoHost-Apps/ulogger_ynh.git
synced 2024-10-01 13:34:45 +02:00
Update install
This commit is contained in:
parent
499724f278
commit
912f538ca6
1 changed files with 13 additions and 19 deletions
|
@ -120,27 +120,21 @@ ynh_replace_string "^\$enabled = false;" "\$enabled = true;" "$final_path/script
|
||||||
ynh_replace_string "__admin__" "$admin" ../conf/admin.sql
|
ynh_replace_string "__admin__" "$admin" ../conf/admin.sql
|
||||||
ynh_replace_string "__admin_pwd__" "$admin_password" ../conf/admin.sql
|
ynh_replace_string "__admin_pwd__" "$admin_password" ../conf/admin.sql
|
||||||
|
|
||||||
# Set the app as temporarily public for curl call
|
|
||||||
ynh_print_info "Configuring SSOwat..."
|
|
||||||
|
|
||||||
ynh_app_setting_set $app skipped_uris "/"
|
#=================================================
|
||||||
# Reload SSOwat config
|
# SETUP APPLICATION WITH CURL
|
||||||
yunohost app ssowatconf
|
#=================================================
|
||||||
|
|
||||||
# Reload Nginx
|
# Set the app as temporarily public for cURL call
|
||||||
systemctl reload nginx
|
ynh_permission_update --permission "main" --add "visitors"
|
||||||
|
|
||||||
# Installation with curl
|
# Reload NGINX
|
||||||
ynh_print_info "Finalizing installation..."
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
|
ynh_script_progression --message="Finalizing installation..."
|
||||||
|
|
||||||
ynh_local_curl "/scripts/setup.php" "command=setup"
|
ynh_local_curl "/scripts/setup.php" "command=setup"
|
||||||
|
|
||||||
# Remove the public access
|
|
||||||
if [ $is_public -eq 0 ]
|
|
||||||
then
|
|
||||||
ynh_app_setting_delete $app skipped_uris
|
|
||||||
fi
|
|
||||||
|
|
||||||
#Add the admin account to the database
|
#Add the admin account to the database
|
||||||
ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" < "../conf/admin.sql"
|
ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" < "../conf/admin.sql"
|
||||||
#Disable setup for security
|
#Disable setup for security
|
||||||
|
@ -167,10 +161,10 @@ chown -R $app: $final_path
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring permissions..."
|
ynh_script_progression --message="Configuring permissions..."
|
||||||
|
|
||||||
# Make app public if necessary
|
# Make app public if necessary or protect it
|
||||||
if [ $is_public -eq 1 ]
|
if [ $is_public -eq 0 ]
|
||||||
then
|
then
|
||||||
ynh_permission_update --permission="main" --add="visitors"
|
ynh_permission_update --permission "main" --remove "visitors"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -178,7 +172,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reloading nginx web server..."
|
ynh_script_progression --message="Reloading nginx web server..."
|
||||||
|
|
||||||
systemctl reload nginx
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SEND A README FOR THE ADMIN
|
# SEND A README FOR THE ADMIN
|
||||||
|
|
Loading…
Reference in a new issue