1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cryptpad_ynh.git synced 2024-09-03 18:26:14 +02:00

Load variables from config file during the upgrade (#185)

* Update upgrade

* Removes echo

* Auto-update README

---------

Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com>
Co-authored-by: Tagada <36127788+Tagadda@users.noreply.github.com>
Co-authored-by: yunohost-bot <yunohost@yunohost.org>
This commit is contained in:
DDATAA 2024-03-06 14:15:41 +00:00 committed by GitHub
parent 767b11427e
commit 35d0c54c3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -103,6 +103,12 @@ yunohost service add $app --description="Zero Knowledge realtime collaborative e
#================================================= #=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=1 ynh_script_progression --message="Updating a configuration file..." --weight=1
CONF=$install_dir/config/config.js
if test -f "$CONF"; then
supportMailboxKey=$(ynh_read_var_in_file --file=$CONF --key=supportMailboxPublicKey)
adminKeys=$(ynh_read_var_in_file --file=$CONF --key=adminKeys)
fi
ynh_add_config --template="config.js" --destination="$install_dir/config/config.js" ynh_add_config --template="config.js" --destination="$install_dir/config/config.js"
chmod 600 "$install_dir/config/config.js" chmod 600 "$install_dir/config/config.js"