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:
parent
a49ddbe487
commit
5e0446593a
1 changed files with 7 additions and 9 deletions
|
@ -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"
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue