mirror of
https://github.com/YunoHost-Apps/galene_ynh.git
synced 2024-09-03 18:36:31 +02:00
Merge branch 'testing' into datadir
This commit is contained in:
commit
cb56684872
6 changed files with 39 additions and 55 deletions
|
@ -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.
|
||||
-->
|
||||
|
||||
|
@ -31,7 +31,7 @@ Galène is a videoconference server (an “SFU”) that is easy to deploy and th
|
|||
- Command-line client for Galene file transfer
|
||||
|
||||
|
||||
**Shipped version:** 0.8.0~ynh1
|
||||
**Shipped version:** 0.8.0~ynh2
|
||||
|
||||
**Demo:** https://galene.org:8443/
|
||||
|
||||
|
@ -60,4 +60,4 @@ or
|
|||
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>
|
|
@ -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.
|
||||
-->
|
||||
|
||||
|
@ -31,7 +31,7 @@ Galène est un serveur de visioconférence (un « SFU ») facile à déployer et
|
|||
- Client en ligne de commande pour le transfert de fichiers Galene
|
||||
|
||||
|
||||
**Version incluse :** 0.8.0~ynh1
|
||||
**Version incluse :** 0.8.0~ynh2
|
||||
|
||||
**Démo :** https://galene.org:8443/
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ name = "Galène"
|
|||
description.en = "Videoconferencing server that is easy to deploy"
|
||||
description.fr = "Serveur de visioconférence facile à déployer"
|
||||
|
||||
version = "0.8.0~ynh1"
|
||||
version = "0.8.0~ynh2"
|
||||
|
||||
maintainers = ["eric_G"]
|
||||
|
||||
|
@ -72,8 +72,8 @@ ram.runtime = "50M"
|
|||
autoupdate.strategy = "latest_github_tag"
|
||||
|
||||
[resources.sources.ldap]
|
||||
url = "https://github.com/jech/galene-ldap/archive/4989ce2f6472eff2681516a47d8a604abd0138d3.tar.gz"
|
||||
sha256 = "a70916a5e3e6a772f753174225f5ab652ac83e60b0692287270551ed75fe0442"
|
||||
url = "https://github.com/jech/galene-ldap/archive/4ca51804f43b2f13a10397c5f84c32395a3f17ca.tar.gz"
|
||||
sha256 = "3db8594b2c09b175adde5dc202110fc095d556def17dfebc21462a5a9b386644"
|
||||
autoupdate.upstream = "https://github.com/jech/galene-ldap"
|
||||
autoupdate.strategy = "latest_github_commit"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
# Configure Galène
|
||||
ynh_add_config --template="../conf/config.json" --destination="$data_dir/data/config.json"
|
||||
chmod 400 "$data_dir/data/config.json"
|
||||
chown $app:$app "$data_dir/data/config.json"
|
||||
ynh_add_config --template="config.json" --destination="$install_dir/live/data/config.json"
|
||||
chmod 400 "$install_dir/live/data/config.json"
|
||||
chown $app:$app "$install_dir/live/data/config.json"
|
||||
|
||||
# Configure Galène LDAP
|
||||
key=$(jose jwk gen -i '{"kty":"oct","alg":"HS256"}')
|
||||
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"
|
||||
chown $app:$app "$install_dir/live_ldap/data/galene-ldap.json"
|
||||
|
||||
# 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"
|
||||
chown $app:$app "$data_dir/groups/$group_name.json"
|
||||
|
||||
# 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"
|
||||
chown $app:$app "$data_dir/groups/YunoHost_Users.json"
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
# 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`)
|
||||
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
||||
|
@ -28,20 +29,10 @@ then
|
|||
yunohost service remove ${app}_ldap
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# STOP AND REMOVE SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1
|
||||
|
||||
# Remove the dedicated systemd config
|
||||
ynh_remove_systemd_config
|
||||
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
|
||||
ynh_remove_nginx_config
|
||||
|
||||
|
|
|
@ -16,12 +16,6 @@ source /usr/share/yunohost/helpers
|
|||
|
||||
password=$(ynh_app_setting_get --app=$app --key=password)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
#=================================================
|
||||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
|
@ -82,28 +76,27 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Building app..." --weight=1
|
||||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
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"
|
||||
ynh_exec_warn_less ynh_install_go --go_version=$go_version
|
||||
ynh_use_go
|
||||
|
||||
chmod +x "$install_dir/galene-password-generator"
|
||||
fi
|
||||
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"
|
||||
|
||||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
|
@ -116,7 +109,7 @@ ynh_script_progression --message="Updating a configuration file..." --weight=2
|
|||
# ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash"
|
||||
#fi
|
||||
# Configure Galène
|
||||
#ynh_add_config --template="../conf/config.json" --destination="$data_dir/data/config.json"
|
||||
#ynh_add_config --template="config.json" --destination="$data_dir/data/config.json"
|
||||
#chmod 400 "$data_dir/data/config.json"
|
||||
#chown $app:$app "$data_dir/data/config.json"
|
||||
|
||||
|
@ -126,17 +119,17 @@ if [ -z "${key:-}" ]; then
|
|||
key=$(jose jwk gen -i '{"kty":"oct","alg":"HS256"}')
|
||||
ynh_app_setting_set --app=$app --key=key --value=$key
|
||||
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"
|
||||
chown $app:$app "$install_dir/live_ldap/data/galene-ldap.json"
|
||||
|
||||
# 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"
|
||||
#chown $app:$app "$data_dir/groups/$group_name.json"
|
||||
|
||||
# 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"
|
||||
chown $app:$app "$data_dir/groups/YunoHost_Users.json"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue