3
0
mirror of https://github.com/rvalitov/zabbix-php-fpm.git synced 2023-11-05 03:30:27 +01:00

[add] extra sleep for service actions

This commit is contained in:
Ramil Valitov 2020-08-05 20:45:04 +03:00
parent 591b32e499
commit 8d95827cb8
No known key found for this signature in database
GPG Key ID: 2AB186DABDFE1914

View File

@ -460,12 +460,14 @@ function actionService() {
local SERVICE_NAME=$1
local SERVICE_ACTION=$2
local SERVICE_INFO
sleep 3
SERVICE_INFO=$(sudo service "$SERVICE_NAME" $SERVICE_ACTION)
STATUS=$?
if [[ "$STATUS" -ne 0 ]]; then
printRed "Failed to $SERVICE_ACTION service '$SERVICE_NAME':"
echo "$SERVICE_INFO"
fi
sleep 3
}
function restartService() {