nc-limits.sh: Do not trigger ERR trap due to failed tests

This commit is contained in:
twojstaryzdomu 2024-12-22 16:51:16 +01:00 committed by Tobias Knöppler
parent 52010f2baf
commit 6f4b43e3ca
No known key found for this signature in database
GPG Key ID: 44FD368932E645C1

View File

@ -82,14 +82,14 @@ configure()
[[ "$CONF_VALUE" == "$(cat "$CONF")" ]] || service mariadb restart
# RESTART PHP
[[ "$require_fpm_restart" == "true" ]] && {
[[ "$require_fpm_restart" != "true" ]] || {
bash -c "sleep 3; source /usr/local/etc/library.sh; clear_opcache; service php${PHPVER}-fpm restart" &>/dev/null &
}
# redis max memory
local CONF=/etc/redis/redis.conf
local CURRENT_REDIS_MEM="$( grep "^maxmemory" "$CONF" | awk '{ print $2 }' )"
[[ "$REDISMEM" != "$CURRENT_REDIS_MEM" ]] && {
[[ "$REDISMEM" == "$CURRENT_REDIS_MEM" ]] || {
sed -i "s|^maxmemory .*|maxmemory $REDISMEM|" "$CONF"
chown redis:redis "$CONF"
service redis-server restart