1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mautrix_signal_ynh.git synced 2024-09-03 19:46:07 +02:00

Update config

This commit is contained in:
Nathanaël HANNEBERT 2022-11-25 10:20:27 +01:00
parent a49ddbe487
commit 5e0446593a

View file

@ -22,7 +22,7 @@ encryption_allowed=$(ynh_app_setting_get --app=$app --key=encryption_allowed)
#================================================= #=================================================
get__encryption_allowed() { get__encryption_allowed() {
# Maintenance mode status # encryption allowed status
if [ $encryption_allowed -eq "1" ] if [ $encryption_allowed -eq "1" ]
then then
echo "1" echo "1"
@ -41,16 +41,12 @@ get__encryption_allowed() {
set__encryption_allowed() { set__encryption_allowed() {
if [ "$encryption_allowed" -eq "1" ]; then if [ "$encryption_allowed" -eq "1" ]; then
# If encryption_allowed was set to 1, enable maintenance mode ynh_app_setting_set --app=$app --key=encryption_allowed --value="true"
(cd "$final_path" && ynh_exec_as "$app" \ ynh_print_info "Encryption set to allowed"
echo "Site under maintenance." > .maintenance)
ynh_print_info "Maintenance mode disabled"
elif [ "$encryption_allowed" -eq "0" ]; then elif [ "$encryption_allowed" -eq "0" ]; then
# If encryption_allowed was set to 0, disable maintenance mode ynh_app_setting_set --app=$app --key=encryption_allowed --value="false"
ynh_secure_remove --file=$final_path/.maintenance ynh_print_info "Encryption set to not allowed"
ynh_print_info "Maintenance mode enabled"
fi fi
ynh_app_setting_set --app=$app --key=encryption_allowed --value="$encryption_allowed"
} }
#================================================= #=================================================
@ -59,6 +55,8 @@ set__encryption_allowed() {
ynh_app_config_apply() { ynh_app_config_apply() {
_ynh_app_config_apply _ynh_app_config_apply
# TODO: regen the config at --destination="$final_path/config.yaml"
} }