mirror of
https://github.com/YunoHost-Apps/piwigo_ynh.git
synced 2024-09-03 20:06:03 +02:00
Update install
This commit is contained in:
parent
442a796ed1
commit
c8a72c8ffc
1 changed files with 10 additions and 10 deletions
|
@ -65,8 +65,9 @@ ynh_install_app_dependencies "$pkg_dependencies"
|
|||
ynh_script_progression --message="Creating a MySQL database..."
|
||||
|
||||
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||
db_user=$db_name
|
||||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||
ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name
|
||||
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
@ -138,7 +139,7 @@ ynh_secure_remove --file="$tmpdir"
|
|||
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION
|
||||
ynh_add_fpm_config
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
|
||||
#=================================================
|
||||
|
@ -146,11 +147,10 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Installing Piwigo with cURL..." --weight=5
|
||||
|
||||
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
|
||||
# Reload SSOwat config
|
||||
yunohost app ssowatconf
|
||||
# Set the app as temporarily public for cURL call
|
||||
ynh_permission_update --permission="main" --add="visitors"
|
||||
|
||||
# Reload Nginx
|
||||
# Reload NGINX
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
# Generate random password for admin
|
||||
|
@ -163,10 +163,10 @@ else
|
|||
applanguage="en_UK"
|
||||
fi
|
||||
|
||||
# Configure piwigo via curl
|
||||
# Configure Piwigo via cURL
|
||||
mail="$(ynh_user_get_info --username=$admin --key=mail)"
|
||||
|
||||
# Installation with curl
|
||||
# Installation with cURL
|
||||
ynh_local_curl "/install.php?language=$applanguage" "install=true" "dbuser=$db_name" "dbpasswd=$db_pwd" "dbname=$db_name" "admin_name=$admin" "admin_pass1=$adm_pwd" "admin_pass2=$adm_pwd" "admin_mail=$mail"
|
||||
|
||||
#=================================================
|
||||
|
@ -234,9 +234,9 @@ ynh_add_fail2ban_config --logpath="/var/log/${app}FailedLogins.log" --failregex=
|
|||
ynh_script_progression --message="Configuring permissions..."
|
||||
|
||||
# Make app public if necessary
|
||||
if [ $is_public -eq 1 ]
|
||||
if [ $is_public -eq 0 ]
|
||||
then
|
||||
ynh_permission_update --permission="main" --add="visitors"
|
||||
ynh_permission_update --permission="main" --remove="visitors"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue