mirror of
https://github.com/YunoHost-Apps/phpldapadmin_ynh.git
synced 2024-09-03 19:56:45 +02:00
parent
5821adbc81
commit
9f96541bfd
13 changed files with 41 additions and 54 deletions
11
README.md
11
README.md
|
@ -1,6 +1,6 @@
|
|||
# phpLDAPadmin for YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/phpldapadmin)
|
||||
[](https://dash.yunohost.org/appci/app/phpldapadmin)  
|
||||
[](https://install-app.yunohost.org/?app=phpldapadmin)
|
||||
|
||||
> *This package allow you to install phpLDAPadmin quickly and simply on a YunoHost server.
|
||||
|
@ -9,7 +9,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
|
|||
## Overview
|
||||
phpLDAPadmin is a web app for administering Lightweight Directory Access Protocol (LDAP) servers.
|
||||
|
||||
**Shipped version:** 1.2.4
|
||||
**Shipped version:** 1.2.6.2
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
@ -27,9 +27,8 @@ phpLDAPadmin is a web app for administering Lightweight Directory Access Protoco
|
|||
|
||||
#### Supported architectures
|
||||
|
||||
* x86-64b - [](https://ci-apps.yunohost.org/ci/apps/phpldapadmin/)
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/phpldapadmin/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/phpldapadmin/)
|
||||
* Jessie x86-64b - [](https://ci-stretch.nohost.me/ci/apps/phpldapadmin/)
|
||||
|
||||
## Links
|
||||
|
||||
|
@ -40,10 +39,8 @@ phpLDAPadmin is a web app for administering Lightweight Directory Access Protoco
|
|||
|
||||
---
|
||||
|
||||
Developers info
|
||||
----------------
|
||||
## Developers info
|
||||
|
||||
**Only if you want to use a testing branch for coding, instead of merging directly into master.**
|
||||
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/phpldapadmin_ynh/tree/testing).
|
||||
|
||||
To try the testing branch, please proceed like that.
|
||||
|
|
|
@ -20,16 +20,8 @@
|
|||
incorrect_path=1
|
||||
change_url=0
|
||||
;;; Levels
|
||||
Level 1=auto
|
||||
Level 2=auto
|
||||
Level 3=auto
|
||||
Level 4=auto
|
||||
# If the level 5 (Package linter) is forced to 1. Please add justifications here.
|
||||
Level 5=auto
|
||||
Level 6=auto
|
||||
Level 7=auto
|
||||
Level 8=0
|
||||
Level 9=0
|
||||
Level 10=0
|
||||
;;; Options
|
||||
Email=aymhce@gmail.com
|
||||
Notification=none
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/leenooks/phpLDAPadmin/archive/1.2.4.tar.gz
|
||||
SOURCE_SUM=890f1b68d9197eb8edd5366a8ac6e3bf34c2d5780e80e67b89fe3017adeb8f49
|
||||
SOURCE_URL=https://github.com/leenooks/phpLDAPadmin/archive/1.2.6.2.tar.gz
|
||||
SOURCE_SUM=49b14019bf611267720b4e9de33f2502b44c526809f17225a4a76ee8296b8d64
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
|
@ -283,7 +283,7 @@ $servers->newServer('ldap_pla');
|
|||
|
||||
/* A convenient name that will appear in the tree viewer and throughout
|
||||
phpLDAPadmin to identify this LDAP server to users. */
|
||||
$servers->setValue('server','name','Yunohost OpenLDAP Server');
|
||||
$servers->setValue('server','name','YunoHost OpenLDAP Server');
|
||||
$servers->setValue('login','bind_id','cn=admin,dc=yunohost,dc=org');
|
||||
|
||||
/* Examples:
|
||||
|
|
|
@ -8,11 +8,13 @@ location __PATH__/ {
|
|||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
index index.php;
|
||||
|
||||
try_files $uri $uri/ index.php;
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock;
|
||||
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
|
|
|
@ -33,7 +33,7 @@ group = __USER__
|
|||
; (IPv6 and IPv4-mapped) on a specific port;
|
||||
; '/path/to/unix/socket' - to listen on a unix socket.
|
||||
; Note: This value is mandatory.
|
||||
listen = /var/run/php/php7.0-fpm-__NAMETOCHANGE__.sock
|
||||
listen = /var/run/php/php__PHPVERSION__-fpm-__NAMETOCHANGE__.sock
|
||||
|
||||
; Set listen(2) backlog.
|
||||
; Default Value: 511 (-1 on FreeBSD and OpenBSD)
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
{
|
||||
"name": "phpLDAPadmin",
|
||||
"id": "phpldapadmin",
|
||||
"url": "http://phpldapadmin.sourceforge.net",
|
||||
"packaging_format": 1,
|
||||
"description": {
|
||||
"en": "Manage OpenLDAP database over the web",
|
||||
"fr": "Application web de gestion de la base OpenLDAP"
|
||||
},
|
||||
"version": "1.2.4~ynh1",
|
||||
"version": "1.2.6.2~ynh1",
|
||||
"url": "http://phpldapadmin.sourceforge.net",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"maintainer": {
|
||||
"name": "aymhce",
|
||||
"email": "aymhce@gmail.com"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 3.5"
|
||||
"yunohost": ">= 4.0.0"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
YNH_PHP_VERSION="7.3"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
|
@ -14,44 +13,41 @@ source /usr/share/yunohost/helpers
|
|||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||
ynh_print_info --message="Loading installation settings..."
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
|
||||
#=================================================
|
||||
# STANDARD BACKUP STEPS
|
||||
#=================================================
|
||||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the main app directory..." --weight=2
|
||||
|
||||
ynh_backup --src_path="$final_path"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up nginx web server configuration..." --weight=1
|
||||
|
||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up php-fpm configuration..." --weight=1
|
||||
|
||||
ynh_backup --src_path="/etc/php/7.0/fpm/pool.d/$app.conf"
|
||||
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last
|
||||
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||
|
|
|
@ -13,7 +13,6 @@ source /usr/share/yunohost/helpers
|
|||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
|
@ -24,7 +23,6 @@ domain=$YNH_APP_ARG_DOMAIN
|
|||
path_url=$YNH_APP_ARG_PATH
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
#=================================================
|
||||
|
@ -57,9 +55,9 @@ ynh_setup_source --dest_dir="$final_path"
|
|||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring nginx web server..." --weight=2
|
||||
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
||||
|
||||
# Create a dedicated nginx config
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
|
@ -73,10 +71,11 @@ ynh_system_user_create --username=$app
|
|||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring php-fpm..." --weight=3
|
||||
ynh_script_progression --message="Configuring PHP-FPM..." --weight=3
|
||||
|
||||
# Create a dedicated php-fpm config
|
||||
ynh_add_fpm_config
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
|
@ -84,7 +83,7 @@ ynh_add_fpm_config
|
|||
# GRANT ACCESS RIGHT TO ADMIN
|
||||
#=================================================
|
||||
|
||||
yunohost app addaccess $app -u $admin
|
||||
ynh_permission_update --permission "main" --add $admin --remove "all_users"
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
|
@ -111,7 +110,7 @@ chown -R root: $final_path
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..." --weight=2
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --weight=2
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
|
@ -32,21 +32,19 @@ ynh_secure_remove --file="$final_path"
|
|||
#=================================================
|
||||
# REMOVE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing nginx web server configuration..." --weight=2
|
||||
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=2
|
||||
|
||||
# Remove the dedicated nginx config
|
||||
# Remove the dedicated NGINX config
|
||||
ynh_remove_nginx_config
|
||||
|
||||
#=================================================
|
||||
# REMOVE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing php-fpm configuration..." --weight=1
|
||||
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1
|
||||
|
||||
# Remove the dedicated php-fpm config
|
||||
# Remove the dedicated PHP-FPM config
|
||||
ynh_remove_fpm_config
|
||||
|
||||
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -28,6 +28,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
|
@ -73,7 +74,7 @@ chown -R root: $final_path
|
|||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_restore_file --origin_path="/etc/php/7.0/fpm/pool.d/$app.conf"
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
|
@ -88,9 +89,9 @@ yunohost app addaccess $app -u $admin
|
|||
#=================================================
|
||||
# RELOAD NGINX AND PHP-FPM
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server and php-fpm..." --weight=1
|
||||
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=php7.0-fpm --action=reload
|
||||
ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -75,9 +75,9 @@ fi
|
|||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=2
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
|
||||
|
||||
# Create a dedicated nginx config
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
|
@ -91,9 +91,9 @@ ynh_system_user_create --username=$app
|
|||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading php-fpm configuration..." --weight=5
|
||||
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
|
||||
|
||||
#=================================================
|
||||
|
@ -102,7 +102,7 @@ ynh_add_fpm_config
|
|||
# GRANT ACCESS RIGHT TO ADMIN
|
||||
#=================================================
|
||||
|
||||
yunohost app addaccess $app -u $admin
|
||||
ynh_permission_update --permission "main" --add $admin --remove "all_users"
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
|
@ -131,7 +131,7 @@ chown -R root: $final_path
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..." --weight=1
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue