From 520f6da519a96ea4d0e4c7d882f992dc7b5cc925 Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Wed, 28 Aug 2013 18:52:54 +0530 Subject: [PATCH] Check Common Directory Exist If Not Then Download Opcache Files --- usr/local/sbin/easyengine | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/usr/local/sbin/easyengine b/usr/local/sbin/easyengine index 266e77e6..f3624b05 100755 --- a/usr/local/sbin/easyengine +++ b/usr/local/sbin/easyengine @@ -632,14 +632,17 @@ TOTALCACHENGINX() # Activate W3 Total Cache wp plugin activate w3-total-cache $NETWORKACTIVATE || OwnError "Unable To Activate W3 Total Cache Plugin" - # Memcached Settings - mkdir -p /var/www/shared/opcache || OwnError "Unable To Create Memcached Directory" - cd /var/www/shared/opcache || OwnError "Unable To Change Memcached Directory" - - # Download Memcache Status Files - wget -c https://raw.github.com/rlerdorf/opcache-status/master/opcache.php - wget -c https://raw.github.com/amnuts/opcache-gui/master/index.php -O opgui.php - wget -c https://gist.github.com/ck-on/4959032/raw/0b871b345fd6cfcd6d2be030c1f33d1ad6a475cb/ocp.php + if [ ! -d /var/www/shared/opcache ] + then + # Memcached Settings + mkdir -p /var/www/shared/opcache || OwnError "Unable To Create Memcached Directory" + cd /var/www/shared/opcache || OwnError "Unable To Change Memcached Directory" + + # Download Memcache Status Files + wget -c https://raw.github.com/rlerdorf/opcache-status/master/opcache.php + wget -c https://raw.github.com/amnuts/opcache-gui/master/index.php -O opgui.php + wget -c https://gist.github.com/ck-on/4959032/raw/0b871b345fd6cfcd6d2be030c1f33d1ad6a475cb/ocp.php + fi } SUPERCACHENGINX()