1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/galene_ynh.git synced 2024-09-03 18:36:31 +02:00
* Stop auto updating for now

* Update manifest.json

* Update ynh_install_go

* Update ynh_install_go

* Update ldap.src

* Add feature to readme

* Auto-update README

* 0.6.2

* Auto-update README

* cleaning

* Auto-update README

* Auto-update README

* Update systemd.service

* Upgrade auto-updater (#106)

* [autopatch] Upgrade auto-updater

* Auto-update README

---------

Co-authored-by: tituspijean <titus@pijean.ovh>

* Galene v2 (#104)

* v2

* Fix

* Auto-update README

* Fix

* fix

* Fix

* Fix

* Auto-update README

* Fix

* Auto-update README

* Fix

* Auto-update README

* Update tests.toml

* Fix

* Update manifest.toml

* Update manifest.toml

* Update tests.toml

* Update tests.toml

* Update tests.toml

* Update tests.toml

* Update tests.toml

* Update restore

* Update install

* Update upgrade

* Update manifest.toml

* Update ynh_install_go

* Update change_url

* Auto-update README

* Update change_url

* fix

* Update change_url

* Update change_url

* Update manifest.toml

* fix

* Update systemd.service

* Update systemd.service

* Update systemd.service

* Update systemd.service

* Update systemd.service

* Update upgrade

* Update upgrade

* Update install

* Update upgrade

* Update manifest.toml

---------

Co-authored-by: yunohost-bot <yunohost@yunohost.org>

* Update manifest.toml

* Auto-update README

* Update manifest.toml

* Fix

* Update DESCRIPTION.md

* Auto-update README

* Create POST_INSTALL.md

* Auto-update README

* fix

* Auto-update README

* Create POST_INSTALL_fr.md

* Fix

* Fix

* Update change_url

* Update manifest.toml

* Delete app.src

* fix

* Update manifest.toml

* cleaning

* Update manifest.toml

* Update manifest.toml

* Update manifest.toml

* Update manifest.toml

* Update manifest.toml

* Update install

* Password generator (#109)

* fix

* Update install

* Update install

* Update install

* Update install

* Update manifest.toml

* Update install

* Update manifest.toml

* fix

* Update install

* fix

* fix

* Update config.json

* fix

* Update manifest.toml

* Auto-update README

* Update upgrade

* Update upgrade

* fix

* Update restore

* Update _common.sh

* hash password

* autoupdate

* Update manifest.toml

* Update manifest.toml

* Auto-update README

* Update manifest.toml

* 0.7.0

* Auto-update README

* Update ldap.service

* add invite user

* Auto-update README

* add sudirs

* Update config.json

* Update config.json

* add description

* Auto-update README

* Update manifest.toml

* Update manifest.toml

* Auto-update README

* Update manifest.toml

* Update remove

* Update manifest.toml

* Auto-update README

* Upgrade sources (#120)

* Upgrade sources (#121)

* Update manifest.toml

* Update manifest.toml

* Update manifest.toml

* Auto-update README

* Upgrade sources (#123)

* Update manifest.toml

* Auto-update README

* cleaning

* Auto-update README

---------

Co-authored-by: yunohost-bot <yunohost@yunohost.org>
Co-authored-by: YunoHost Bot <yunohost-bot@users.noreply.github.com>
Co-authored-by: tituspijean <titus@pijean.ovh>
This commit is contained in:
eric_G 2024-02-28 22:20:14 +01:00 committed by GitHub
parent 2d30e650d5
commit 3f46afac03
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 32 additions and 48 deletions

View file

@ -1,5 +1,5 @@
<!-- <!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/readme_generator
It shall NOT be edited by hand. It shall NOT be edited by hand.
--> -->
@ -60,4 +60,4 @@ or
sudo yunohost app upgrade galene -u https://github.com/YunoHost-Apps/galene_ynh/tree/testing --debug sudo yunohost app upgrade galene -u https://github.com/YunoHost-Apps/galene_ynh/tree/testing --debug
``` ```
**More info regarding app packaging:** <https://yunohost.org/packaging_apps> **More info regarding app packaging:** <https://yunohost.org/packaging_apps>

View file

@ -1,5 +1,5 @@
<!-- <!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/readme_generator
It shall NOT be edited by hand. It shall NOT be edited by hand.
--> -->

View file

@ -93,24 +93,24 @@ password_hash=$(echo $($install_dir/galene-password-generator $password))
ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash" ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash"
# Configure Galène # Configure Galène
ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json" ynh_add_config --template="config.json" --destination="$install_dir/live/data/config.json"
chmod 400 "$install_dir/live/data/config.json" chmod 400 "$install_dir/live/data/config.json"
chown $app:$app "$install_dir/live/data/config.json" chown $app:$app "$install_dir/live/data/config.json"
# Configure Galène LDAP # Configure Galène LDAP
key=$(jose jwk gen -i '{"kty":"oct","alg":"HS256"}') key=$(jose jwk gen -i '{"kty":"oct","alg":"HS256"}')
ynh_app_setting_set --app=$app --key=key --value="$key" ynh_app_setting_set --app=$app --key=key --value="$key"
ynh_add_config --template="../conf/galene-ldap.json" --destination="$install_dir/live_ldap/data/galene-ldap.json" ynh_add_config --template="galene-ldap.json" --destination="$install_dir/live_ldap/data/galene-ldap.json"
chmod 400 "$install_dir/live_ldap/data/galene-ldap.json" chmod 400 "$install_dir/live_ldap/data/galene-ldap.json"
chown $app:$app "$install_dir/live_ldap/data/galene-ldap.json" chown $app:$app "$install_dir/live_ldap/data/galene-ldap.json"
# Create a group name config # Create a group name config
ynh_add_config --template="../conf/groupname.json" --destination="$data_dir/groups/$group_name.json" ynh_add_config --template="groupname.json" --destination="$data_dir/groups/$group_name.json"
chmod 400 "$data_dir/groups/$group_name.json" chmod 400 "$data_dir/groups/$group_name.json"
chown $app:$app "$data_dir/groups/$group_name.json" chown $app:$app "$data_dir/groups/$group_name.json"
# Create a group name authenticated on LDAP # Create a group name authenticated on LDAP
ynh_add_config --template="../conf/groupname-ldap.json" --destination="$data_dir/groups/YunoHost_Users.json" ynh_add_config --template="groupname-ldap.json" --destination="$data_dir/groups/YunoHost_Users.json"
chmod 400 "$data_dir/groups/YunoHost_Users.json" chmod 400 "$data_dir/groups/YunoHost_Users.json"
chown $app:$app "$data_dir/groups/YunoHost_Users.json" chown $app:$app "$data_dir/groups/YunoHost_Users.json"

View file

@ -14,6 +14,7 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# REMOVE SERVICE INTEGRATION IN YUNOHOST # REMOVE SERVICE INTEGRATION IN YUNOHOST
#================================================= #=================================================
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) # Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status $app >/dev/null if ynh_exec_warn_less yunohost service status $app >/dev/null
@ -28,20 +29,10 @@ then
yunohost service remove ${app}_ldap yunohost service remove ${app}_ldap
fi fi
#=================================================
# STOP AND REMOVE SERVICE
#=================================================
ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1
# Remove the dedicated systemd config # Remove the dedicated systemd config
ynh_remove_systemd_config ynh_remove_systemd_config
ynh_remove_systemd_config --service=${app}_ldap ynh_remove_systemd_config --service=${app}_ldap
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
# Remove the dedicated NGINX config # Remove the dedicated NGINX config
ynh_remove_nginx_config ynh_remove_nginx_config

View file

@ -16,12 +16,6 @@ source /usr/share/yunohost/helpers
password=$(ynh_app_setting_get --app=$app --key=password) password=$(ynh_app_setting_get --app=$app --key=password)
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# STANDARD UPGRADE STEPS # STANDARD UPGRADE STEPS
#================================================= #=================================================
@ -82,28 +76,27 @@ ynh_add_nginx_config
#================================================= #=================================================
ynh_script_progression --message="Building app..." --weight=1 ynh_script_progression --message="Building app..." --weight=1
if [ "$upgrade_type" == "UPGRADE_APP" ] ynh_exec_warn_less ynh_install_go --go_version=$go_version
then ynh_use_go
ynh_exec_warn_less ynh_install_go --go_version=$go_version
ynh_use_go
pushd $install_dir/build/galene-password-generator/
ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -o $install_dir/
popd
pushd $install_dir/build/
ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $install_dir/live/
popd
pushd $install_dir/build_ldap/
ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $install_dir/live_ldap/
popd
ynh_remove_go
ynh_secure_remove --file="$install_dir/build/"
ynh_secure_remove --file="$install_dir/build_ldap/"
ynh_secure_remove --file="$install_dir/.cache/"
ynh_secure_remove --file="$install_dir/go/"
ynh_secure_remove --file="$install_dir/.go-version"
chmod +x "$install_dir/galene-password-generator" pushd $install_dir/build/galene-password-generator/
fi ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -o $install_dir/
popd
pushd $install_dir/build/
ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $install_dir/live/
popd
pushd $install_dir/build_ldap/
ynh_exec_warn_less ynh_exec_as $app CGO_ENABLED=0 $ynh_go build -ldflags='-s -w' -o $install_dir/live_ldap/
popd
ynh_remove_go
ynh_secure_remove --file="$install_dir/build/"
ynh_secure_remove --file="$install_dir/build_ldap/"
ynh_secure_remove --file="$install_dir/.cache/"
ynh_secure_remove --file="$install_dir/go/"
ynh_secure_remove --file="$install_dir/.go-version"
chmod +x "$install_dir/galene-password-generator"
#================================================= #=================================================
# UPDATE A CONFIG FILE # UPDATE A CONFIG FILE
@ -116,7 +109,7 @@ if [ -z "${password_hash:-}" ]; then
ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash" ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash"
fi fi
# Configure Galène # Configure Galène
ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json" ynh_add_config --template="config.json" --destination="$install_dir/live/data/config.json"
chmod 400 "$install_dir/live/data/config.json" chmod 400 "$install_dir/live/data/config.json"
chown $app:$app "$install_dir/live/data/config.json" chown $app:$app "$install_dir/live/data/config.json"
@ -126,17 +119,17 @@ if [ -z "${key:-}" ]; then
key=$(jose jwk gen -i '{"kty":"oct","alg":"HS256"}') key=$(jose jwk gen -i '{"kty":"oct","alg":"HS256"}')
ynh_app_setting_set --app=$app --key=key --value=$key ynh_app_setting_set --app=$app --key=key --value=$key
fi fi
ynh_add_config --template="../conf/galene-ldap.json" --destination="$install_dir/live_ldap/data/galene-ldap.json" ynh_add_config --template="galene-ldap.json" --destination="$install_dir/live_ldap/data/galene-ldap.json"
chmod 400 "$install_dir/live_ldap/data/galene-ldap.json" chmod 400 "$install_dir/live_ldap/data/galene-ldap.json"
chown $app:$app "$install_dir/live_ldap/data/galene-ldap.json" chown $app:$app "$install_dir/live_ldap/data/galene-ldap.json"
# Create a group name config # Create a group name config
ynh_add_config --template="../conf/groupname.json" --destination="$data_dir/groups/$group_name.json" ynh_add_config --template="groupname.json" --destination="$data_dir/groups/$group_name.json"
chmod 400 "$data_dir/groups/$group_name.json" chmod 400 "$data_dir/groups/$group_name.json"
chown $app:$app "$data_dir/groups/$group_name.json" chown $app:$app "$data_dir/groups/$group_name.json"
# Create a group name authenticated on LDAP # Create a group name authenticated on LDAP
ynh_add_config --template="../conf/groupname-ldap.json" --destination="$data_dir/groups/YunoHost_Users.json" ynh_add_config --template="groupname-ldap.json" --destination="$data_dir/groups/YunoHost_Users.json"
chmod 400 "$data_dir/groups/YunoHost_Users.json" chmod 400 "$data_dir/groups/YunoHost_Users.json"
chown $app:$app "$data_dir/groups/YunoHost_Users.json" chown $app:$app "$data_dir/groups/YunoHost_Users.json"