diff --git a/checkService.sh b/checkService.sh index b947706..5e8678f 100755 --- a/checkService.sh +++ b/checkService.sh @@ -78,6 +78,7 @@ function compare(){ } function restart(){ + sleep 4 systemctl restart $serviceName if [ $? -ne 0 ]; then echo "error: systemctl restart ${serviceName} failed!"