From 0feed8bd1d96b8880092796a2f41029f68cedf9a Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Sat, 11 Jul 2015 16:46:43 +0200 Subject: [PATCH] more checks for new installs --- bin/yiic | 8 ++++++++ web/yaamp/commands/CheckupCommand.php | 16 +++++++++++++++- web/yiic | 4 ---- 3 files changed, 23 insertions(+), 5 deletions(-) create mode 100755 bin/yiic delete mode 100755 web/yiic diff --git a/bin/yiic b/bin/yiic new file mode 100755 index 0000000..2fcfd37 --- /dev/null +++ b/bin/yiic @@ -0,0 +1,8 @@ +#!/bin/bash + +ROOTDIR=/data/yiimp +DIR=`pwd` + +cd "$ROOTDIR/web" && php yaamp/yiic.php $* + +cd $DIR diff --git a/web/yaamp/commands/CheckupCommand.php b/web/yaamp/commands/CheckupCommand.php index 0a9b9f8..216b714 100644 --- a/web/yaamp/commands/CheckupCommand.php +++ b/web/yaamp/commands/CheckupCommand.php @@ -38,6 +38,7 @@ class CheckupCommand extends CConsoleCommand } else { self::checkDirectories(); + self::checkPHP(); //self::checkStoredProcedures(); self::checkModels(); @@ -68,7 +69,7 @@ class CheckupCommand extends CConsoleCommand } /** - * Vérifie les répertoires nécessitant le droit d'écriture + * Check we can write in specific folders */ public function checkDirectories() { @@ -76,6 +77,19 @@ class CheckupCommand extends CConsoleCommand //self::isDirWritable("$root/protected/data/."); self::isDirWritable("$root/yaamp/runtime/."); + self::isDirWritable(YAAMP_LOGS."/."); + } + + + /** + * Check all required php modules are present + */ + public function checkPHP() + { + if (!function_exists('curl_init')) + echo("missing curl php extension!\n"); + if (!function_exists('memcache_get')) + echo("missing memcache php extension!\n"); } /** diff --git a/web/yiic b/web/yiic deleted file mode 100755 index 78fc341..0000000 --- a/web/yiic +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -php yaamp/yiic.php $* -