diff --git a/lib/private/util.php b/lib/private/util.php
index 62bbf5cf2aa35198b64a60f02ccd19c1155fa66b..49c422c287ff9efffb80763bfb25bafd1bf5023d 100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -702,7 +702,7 @@ class OC_Util {
 			);
 		}
 
-		if ($webServerRestart) {
+		if (!\OC::$CLI && $webServerRestart) {
 			$errors[] = array(
 				'error' => $l->t('PHP modules have been installed, but they are still listed as missing?'),
 				'hint' => $l->t('Please ask your server administrator to restart the web server.')