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

Print warning instead of killing the process

It is better to print a warning than entirely killing the process
This commit is contained in:
Tio 2023-09-25 15:36:40 +02:00 committed by GitHub
parent 1a8b1473eb
commit e9cc2c89b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,11 +51,11 @@ is_memory_available() {
# terminates installation if requirements not met
check_memory_requirements() {
if ! is_swap_present ; then
ynh_die --message="You must have a swap partition in order to install and use this application"
ynh_print_warn --message="You must have a swap partition in order to install and use this application"
elif ! is_swappiness_sufficient ; then
ynh_die --message="Your swappiness must be higher than 10; please see https://en.wikipedia.org/wiki/Swappiness"
ynh_print_warn --message="Your swappiness must be higher than 10; please see https://en.wikipedia.org/wiki/Swappiness"
elif ! is_memory_available 1000000 ; then
ynh_die --message="You must have a minimum of 1Gb available memory (RAM+swap) for the installation"
ynh_print_warn --message="You must have a minimum of 1Gb available memory (RAM+swap) for the installation"
fi
}
# Checks discourse upgrade memory requirements