1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/galene_ynh.git synced 2024-09-03 18:36:31 +02:00
This commit is contained in:
Éric Gaspar 2023-03-18 20:59:29 +01:00
parent 88fcefa25b
commit 25ff09c366
3 changed files with 14 additions and 1 deletions

View file

@ -1,4 +1,5 @@
{
"canonicalHost": "__DOMAIN__",
"admin":[{"username":"__ADMIN__","password":"__PASSWORD__"}]
"admin":[{"username":"__ADMIN__",
"password":__PASSWORD_HASH__}]
}

View file

@ -72,6 +72,14 @@ ram.runtime = "50M"
url = "https://github.com/jech/galene-ldap/archive/33b8a930372388b2b8b506d2564516fb3eaf895a.tar.gz"
sha256 = "00247712e4e7944fed42026f056f48eb59a95cf476c3ff1cb6e24c54469ce070"
[resources.sources.generator]
amd64.url = "https://www.irif.fr/~jch/software/files/galene-password-generator-linux-amd64.gz"
amd64.sha256 = "a7fccbfa54c82e2e7ada0491364b41f5604ae85fe41b0501a592465e758f8cc4"
arm64.url = "https://www.irif.fr/~jch/software/files/galene-password-generator-linux-arm64.gz"
arm64.sha256 = "7e2e354438321b331f10779d700fc84ee3542f77b1142da9f90c8bbc7aa2680a"
in_subdir = false
rename = "galene-password-generator"
[resources.system_user]
[resources.install_dir]

View file

@ -45,6 +45,7 @@ ynh_script_progression --message="Setting up source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir/build"
ynh_setup_source --dest_dir="$install_dir/build_ldap" --source_id="ldap"
ynh_setup_source --dest_dir="$install_dir/build" --source_id="generator"
mkdir -p "$install_dir/live/data"
mkdir -p "$install_dir/live_ldap/data"
@ -53,6 +54,7 @@ ynh_replace_string --match_string="<div class=\"galene-header\">Galène</div>" -
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
chmod +x "$install_dir/build/galene-password-generator"
#=================================================
# NGINX CONFIGURATION
@ -100,6 +102,8 @@ chown -R $app:www-data "$data_dir"
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
password_hash=$(echo $install_dir/build/galene-password-generator $password)
# Configure Galène
ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json"
chmod 400 "$install_dir/live/data/config.json"