check_webservice_load.sh: fix error, replace '/devnull' with '/dev/null'.

This commit is contained in:
Christoph 2021-01-07 11:51:50 +01:00
parent bfc18b4131
commit 795c4915d8

View File

@ -225,7 +225,7 @@ if $check_mysql ; then
# -
if systemctl -t service list-unit-files \
| grep -e "^mysql" \
| grep -q -E "(enabled|disabled)" 2> /devnull ; then
| grep -q -E "(enabled|disabled)" 2> /dev/null ; then
MYSQLD_SERVICE_FILE=$(systemctl -t service list-unit-files \
| grep -e "^mysql[^0-9]*\.service" \
@ -288,7 +288,7 @@ if $check_postgresql ; then
# -
if systemctl -t service list-unit-files \
| grep -e "^ postgresql" \
| grep -q -E "(enabled|disabled)" 2> /devnull ; then
| grep -q -E "(enabled|disabled)" 2> /dev/null ; then
PSQL_SERVICE_FILE=$(systemctl -t service list-unit-files \
| grep -e "^postgresql" \
@ -329,13 +329,13 @@ if $check_apache ; then
# -
if systemctl -t service list-unit-files \
| grep -e "^apache2.service" \
| grep -q -E "(enabled|disabled)" 2> /devnull ; then
| grep -q -E "(enabled|disabled)" 2> /dev/null ; then
APACHE_SERVICE_FILE="apache2.service"
elif systemctl -t service list-unit-files \
| grep -e "^apache" \
| grep -q -E "(enabled|disabled)" 2> /devnull ; then
| grep -q -E "(enabled|disabled)" 2> /dev/null ; then
APACHE_SERVICE_FILE=$(systemctl -t service list-unit-files \
@ -380,7 +380,7 @@ if $check_nginx ; then
# -
if systemctl -t service list-unit-files \
| grep -e "^nginx" \
| grep -q -E "(enabled|disabled)" 2> /devnull ; then
| grep -q -E "(enabled|disabled)" 2> /dev/null ; then
NGINX_SERVICE_FILE=$(systemctl -t service list-unit-files \
| grep -e "^nginx" \
@ -442,7 +442,7 @@ if $check_php_fpm ; then
# -
if systemctl -t service list-unit-files \
| grep -E "^php-?$_version" \
| grep -q enabled 2> /devnull ; then
| grep -q enabled 2> /dev/null ; then
PHP_FPM_SERVICE_FILE=$(systemctl -t service list-unit-files \
| grep -E "^php-?$_version" \
@ -493,7 +493,7 @@ if $check_redis ; then
# -
if systemctl -t service list-unit-files \
| grep -e "^redis-server" \
| grep -q -E "(enabled|disabled)" 2> /devnull ; then
| grep -q -E "(enabled|disabled)" 2> /dev/null ; then
REDIS_SERVICE_FILE=$(systemctl -t service list-unit-files \
| grep -e "^redis-server" \
@ -527,7 +527,7 @@ if $check_website ; then
# -
if systemctl -t service list-unit-files \
| grep -e "^php-$php_version_of_working_url-" \
| grep -q enabled 2> /devnull ; then
| grep -q enabled 2> /dev/null ; then
PHP_FPM_SERVICE_FILE=$(systemctl -t service list-unit-files \
| grep -e "^php-$php_version_of_working_url-" \