1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/phpldapadmin_ynh.git synced 2024-09-03 19:56:45 +02:00
This commit is contained in:
ericgaspar 2022-10-16 21:18:35 +02:00
parent adaf8c0edb
commit 9f96cd268f
7 changed files with 34 additions and 30 deletions

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/leenooks/phpLDAPadmin/archive/1.2.6.3.tar.gz SOURCE_URL=https://github.com/leenooks/phpLDAPadmin/archive/1.2.6.4.tar.gz
SOURCE_SUM=718f805403279f8e54caa1046b5f43c989e3bce82c408d22d349b5393e4a2cea SOURCE_SUM=92e390c013714c75439737633ad4576bc642d87b0091fab6226cbbcb13a0ea48
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true

View file

@ -2,7 +2,7 @@
location __PATH__/ { location __PATH__/ {
# Path to source # Path to source
alias __FINALPATH__/ ; alias __FINALPATH__/;
index index.php; index index.php;

View file

@ -6,7 +6,7 @@
"en": "Manage OpenLDAP database over the web", "en": "Manage OpenLDAP database over the web",
"fr": "Application web de gestion de la base OpenLDAP" "fr": "Application web de gestion de la base OpenLDAP"
}, },
"version": "1.2.6.3~ynh1", "version": "1.2.6.4~ynh1",
"url": "http://www.phpldapadmin.org", "url": "http://www.phpldapadmin.org",
"upstream": { "upstream": {
"license": "GPL-2.0-or-later", "license": "GPL-2.0-or-later",
@ -21,12 +21,12 @@
"email": "aymhce@gmail.com" "email": "aymhce@gmail.com"
}, },
"requirements": { "requirements": {
"yunohost": ">= 4.3.0" "yunohost": ">= 11.0.9"
}, },
"multi_instance": true, "multi_instance": true,
"services": [ "services": [
"nginx", "nginx",
"php7.3-fpm" "php8.0-fpm"
], ],
"arguments": { "arguments": {
"install" : [ "install" : [

View file

@ -4,7 +4,7 @@
# COMMON VARIABLES # COMMON VARIABLES
#================================================= #=================================================
YNH_PHP_VERSION="7.3" YNH_PHP_VERSION="8.0"
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS

View file

@ -64,14 +64,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
# Create a dedicated NGINX config
ynh_add_nginx_config
#================================================= #=================================================
# PHP-FPM CONFIGURATION # PHP-FPM CONFIGURATION
#================================================= #=================================================
@ -81,6 +73,14 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=3
ynh_add_fpm_config ynh_add_fpm_config
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
# Create a dedicated NGINX config
ynh_add_nginx_config
#================================================= #=================================================
# MODIFY A CONFIG FILE # MODIFY A CONFIG FILE
#================================================= #=================================================

View file

@ -35,16 +35,11 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
ynh_script_progression --message="Validating restoration parameters..." --weight=2 ynh_script_progression --message="Validating restoration parameters..." --weight=2
test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path "
#================================================= #=================================================
# STANDARD RESTORATION STEPS # STANDARD RESTORATION STEPS
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
# RECREATE THE DEDICATED USER # RECREATE THE DEDICATED USER
#================================================= #=================================================
@ -67,9 +62,17 @@ chown -R $app:www-data "$final_path"
#================================================= #=================================================
# RESTORE THE PHP-FPM CONFIGURATION # RESTORE THE PHP-FPM CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
# SPECIFIC RESTORATION # SPECIFIC RESTORATION
#================================================= #=================================================

View file

@ -90,14 +90,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
# Create a dedicated NGINX config
ynh_add_nginx_config
#================================================= #=================================================
# PHP-FPM CONFIGURATION # PHP-FPM CONFIGURATION
#================================================= #=================================================
@ -106,9 +98,18 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=5
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config ynh_add_fpm_config
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
# Create a dedicated NGINX config
ynh_add_nginx_config
#================================================= #=================================================
# MODIFY A CONFIG FILE # MODIFY A CONFIG FILE
#================================================= #=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="../conf/config.php.example" --destination="$final_path/config/config.php" ynh_add_config --template="../conf/config.php.example" --destination="$final_path/config/config.php"
chmod 644 $final_path/config/config.php chmod 644 $final_path/config/config.php