Skip to content
Merged

Fix #41

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Manage OpenLDAP database over the web

[![🌐 Official app website](https://img.shields.io/badge/Official_app_website-darkgreen?style=for-the-badge)](http://www.phpldapadmin.org)
[![App Demo](https://img.shields.io/badge/App_Demo-blue?style=for-the-badge)](https://olddemo.phpldapadmin.org/)
[![Version: 2.0.2~ynh1](https://img.shields.io/badge/Version-2.0.2~ynh1-rgba(0,150,0,1)?style=for-the-badge)](https://ci-apps.yunohost.org/ci/apps/phpldapadmin/)
[![Version: 2.2.1~ynh1](https://img.shields.io/badge/Version-2.2.1~ynh1-rgba(0,150,0,1)?style=for-the-badge)](https://ci-apps.yunohost.org/ci/apps/phpldapadmin/)

<div align="center">
<a href="https://apps.yunohost.org/app/phpldapadmin"><img height="100px" src="https://github.com/YunoHost/yunohost-artwork/raw/refs/heads/main/badges/neopossum-badges/badge_more_info_on_the_appstore.svg"/></a>
Expand Down
6 changes: 3 additions & 3 deletions conf/.env
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
APP_NAME="YunoHost OpenLDAP Server"
APP_ENV=production
APP_KEY=__APP_KEY__
APP_DEBUG=true
APP_URL=https://__DOMAIN____PATH__/
APP_KEY=__KEY__
APP_DEBUG=false
APP_URL=https://__DOMAIN__/

LOG_CHANNEL=daily

Expand Down
1 change: 0 additions & 1 deletion conf/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ location __PATH__/ {
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php__PHP_VERSION__-fpm-__APP__.sock;

fastcgi_index index.php;
include fastcgi_params;
fastcgi_param REMOTE_USER $remote_user;
Expand Down
17 changes: 3 additions & 14 deletions manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "phpLDAPadmin"
description.en = "Manage OpenLDAP database over the web"
description.fr = "Application web de gestion de la base OpenLDAP"

version = "2.0.2~ynh1"
version = "2.2.1~ynh1"

maintainers = ["aymhce"]

Expand Down Expand Up @@ -36,21 +36,10 @@ ram.runtime = "50M"
[install.domain]
type = "domain"

#[install.path]
#type = "path"
#default = "/phpldapadmin"

[install.init_main_permission]
type = "group"
default = "admins"

[install.admin]
type = "user"

[resources]
[resources.sources.main]
url = "https://github.com/leenooks/phpLDAPadmin/archive/refs/tags/2.0.2.tar.gz"
sha256 = "b9ad3b5c94b1ec68729ca24c321d112c030e32da63df65796dfd8edf136d6a17"
url = "https://github.com/leenooks/phpLDAPadmin/archive/refs/tags/2.2.1.tar.gz"
sha256 = "0dc2780abdbcd6d5af20e1ef05c2cec6b89ddce9ba9e84f0da0c282007f8acc9"
autoupdate.strategy = "latest_github_tag"
autoupdate.version_regex = "^RELEASE-(.*)$"

Expand Down
4 changes: 2 additions & 2 deletions scripts/_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# COMMON VARIABLES AND CUSTOM HELPERS
#=================================================

composer_version=2.8.6
nodejs_version=22
composer_version="2.8.9"
nodejs_version="22"
33 changes: 20 additions & 13 deletions scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,31 @@ source _common.sh
source /usr/share/yunohost/helpers

#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
# INITIALIZE AND STORE SETTINGS
#=================================================
ynh_script_progression "Setting up source files..."

# Download, check integrity, uncompress and patch the source from manifest.toml
ynh_setup_source --dest_dir="$install_dir"
key=$(ynh_string_random --length=32)

#=================================================
# INSTALL APP
# INSTALL DEPENDENCIES
#=================================================
ynh_script_progression "Installing app..."
ynh_script_progression "Installing dependencies..."

ynh_nodejs_install
ynh_composer_install
ynh_composer_exec install --optimize-autoloader --no-dev

#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression "Setting up source files..."

# Download, check integrity, uncompress and patch the source from manifest.toml
ynh_setup_source --dest_dir="$install_dir"

#=================================================
# APP INITIAL CONFIGURATION
#=================================================
ynh_script_progression "Adding $app's configuration files..."

pushd "$install_dir"
app_key=$(ynh_hide_warnings ynh_exec_as_app php$php_version artisan key:generate --no-interaction --show)
ynh_app_setting_set --key=app_key --value=$app_key
popd

ynh_config_add --template=".env" --destination="$install_dir/.env"

#=================================================
Expand All @@ -47,6 +46,14 @@ ynh_config_add_phpfpm
# Create a dedicated NGINX config using the conf/nginx.conf template
ynh_config_add_nginx

#=================================================
# INSTALL APP
#=================================================
ynh_script_progression "Installing app..."

ynh_composer_install
ynh_composer_exec install --optimize-autoloader --no-dev

#=================================================
# BUILD APP
#=================================================
Expand Down
29 changes: 3 additions & 26 deletions scripts/upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,11 @@ source _common.sh
source /usr/share/yunohost/helpers

#=================================================
# ENSURE DOWNWARD COMPATIBILITY
# INSTALL DEPENDENCIES
#=================================================
ynh_script_progression "Ensuring downward compatibility..."
ynh_script_progression "Installing dependencies..."

# Before version 2.x phpldapadmin could be installed under a path,
# this functionnality has been deprecated since version 2.0.0 and phpldapadmin
# now need to be installed under its own domain.
# If the app is currently installed under a path, we warn the admin
# that he should move the app under its own domain
if [ "$path" != "/" ]; then
ynh_die --message="Since version 2.0.0, $app need to be installed under its own domain. \
Before upgrading, change $app URL: delete the path and switch to a new domain if needed."
fi
ynh_nodejs_install

#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
Expand All @@ -35,24 +27,9 @@ ynh_setup_source --dest_dir="$install_dir" --full_replace --keep=".env /database
#=================================================
ynh_script_progression "Installing app..."

ynh_nodejs_install
ynh_composer_install
ynh_composer_exec install --optimize-autoloader --no-dev

#=================================================
# APP INITIAL CONFIGURATION
#=================================================
ynh_script_progression "Adding $app's configuration files..."

if ynh_app_upgrading_from_version_before 2.0.0~ynh1; then
pushd "$install_dir"
app_key=$(ynh_hide_warnings ynh_exec_as_app php$php_version artisan key:generate --no-interaction --show)
ynh_app_setting_set --key=app_key --value=$app_key
popd
fi

ynh_config_add --template=".env" --destination="$install_dir/.env"

#=================================================
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
Expand Down
2 changes: 1 addition & 1 deletion tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ test_format = 1.0
# Commits to test upgrade from
# -------------------------------

test_upgrade_from.7b4f1bf9a8a65111be78fe7cdcb7b0d562f2dfd6.name = "Upgrade from 1.2.6.7~ynh2"
test_upgrade_from.db8a9e055b63f06dbf5ab8d86f9ab60fa823aabc.name = "Upgrade from 2.0.2~ynh1"