1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/piwigo_ynh.git synced 2024-09-03 20:06:03 +02:00
This commit is contained in:
Éric Gaspar 2023-12-17 12:56:15 +01:00
parent 93772348af
commit 8b286b601f
3 changed files with 8 additions and 15 deletions

View file

@ -36,12 +36,10 @@ chown -R $app:www-data "$install_dir"
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated PHP-FPM config
ynh_add_fpm_config
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
@ -86,7 +84,7 @@ ynh_local_curl "/install.php?language=$applanguage" "install=true" "dbhost=127.0
#=================================================
# CONFIGURE PIWIGO
#=================================================
ynh_script_progression --message="Configuring Piwigo..."
ynh_script_progression --message="Configuring $app..." --weight=2
# Change local config
ynh_add_config --template="config.inc.php" --destination="$install_dir/local/config/config.inc.php"
@ -101,7 +99,7 @@ chown -R $app:www-data "$install_dir"
#=================================================
# ADD LDAP PLUGIN
#=================================================
ynh_script_progression --message="Configuring LDAP plugin..."
ynh_script_progression --message="Configuring LDAP plugin..." --weight=2
# Activate the LDAP plugin using the WS API

View file

@ -14,13 +14,10 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=2
# Remove the dedicated NGINX config
ynh_remove_nginx_config
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config
# Remove the dedicated Fail2Ban config
ynh_remove_fail2ban_config
#=================================================

View file

@ -68,12 +68,10 @@ chown -R $app:www-data "$install_dir"
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=3
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
# Create a dedicated PHP-FPM config
ynh_add_fpm_config
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
@ -99,13 +97,13 @@ fi
#=================================================
# CONFIGURE PIWIGO
#=================================================
ynh_script_progression --message="Configuring Piwigo..."
ynh_script_progression --message="Configuring $app..." --weight=2
# Change local config
ynh_add_config --template="../conf/config.inc.php" --destination="$install_dir/local/config/config.inc.php"
ynh_add_config --template="config.inc.php" --destination="$install_dir/local/config/config.inc.php"
# Setup database in local/config/database.inc.php
ynh_add_config --template="../conf/database.inc.php" --destination="$install_dir/local/config/database.inc.php"
ynh_add_config --template="database.inc.php" --destination="$install_dir/local/config/database.inc.php"
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
@ -114,7 +112,7 @@ chown -R $app:www-data "$install_dir"
#=================================================
# CONFIGURE LDAP PLUGIN
#=================================================
ynh_script_progression --message="Configuring LDAP plugin..."
ynh_script_progression --message="Configuring LDAP plugin..." --weight=2
# Disable LDAP plugin to avoid warning messages during API call
ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name <<< "DELETE FROM plugins WHERE id='Ldap_Login';"