From 4f7b06b01b8f99111d9c2f2d3fe432ac65099b7f Mon Sep 17 00:00:00 2001 From: harshadyeola Date: Wed, 17 Sep 2014 16:01:09 +0530 Subject: [PATCH] added percona-mysql repo --- bin/easyengine | 3 ++- src/modules/ee_mod_clean.sh | 39 +++++++++++++++++++++---------------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/bin/easyengine b/bin/easyengine index 1c423449..d6931635 100644 --- a/bin/easyengine +++ b/bin/easyengine @@ -91,9 +91,10 @@ elif [ "$EE_FIRST" = "stack" ] || [ "$EE_FIRST" = "system" ]; then # Display success message ee_lib_echo "$EE_THIRD successfully installed" elif [ "$EE_THIRD" = "" ] || [ "$EE_THIRD" = "web" ] || [ "$EE_THIRD" = "all" ]; then - # Setup NGINX/PHP repository + # Setup NGINX/PHP/MySQL repository ee_mod_repo_nginx ee_mod_repo_php + ee_mod_repo_mysql # Fix GnuPG key ee_lib_gpg_key_fix diff --git a/src/modules/ee_mod_clean.sh b/src/modules/ee_mod_clean.sh index 11db8651..970521bf 100644 --- a/src/modules/ee_mod_clean.sh +++ b/src/modules/ee_mod_clean.sh @@ -2,27 +2,31 @@ function ee_mod_clean() { - if [ "$@" = "" ] || [ "$@" = "fastcgi" ]; then - EE_CLEAN_FASTCGI="fastcgi" - elif [ "$@" = "memcache" ]; then - EE_CLEAN_MEMCACHE="memcache" - elif [ "$@" = "opcache" ]; then - EE_CLEAN_OPCACHE="opcache" - elif [ "$@" = "all" ]; then - EE_CLEAN_FASTCGI="fastcgi" - EE_CLEAN_MEMCACHE="memcache" - EE_CLEAN_OPCACHE="opcache" - fi + for ee_clean in $@; do + if [ "$ee_clean" = "" ] || [ "$ee_clean" = "fastcgi" ]; then + ee_clean_fastcgi="fastcgi" + elif [ "$ee_clean" = "memcache" ]; then + ee_clean_memcache="memcache" + elif [ "$ee_clean" = "opcache" ]; then + ee_clean_opcache="opcache" + elif [ "$ee_clean" = "all" ]; then + ee_clean_fastcgi="fastcgi" + ee_clean_memcache="memcache" + ee_clean_opcache="opcache" + fi + done - if [ "$EE_CLEAN_FASTCGI" = "fastcgi" ]; then - ee_lib_echo "Cleaning NGINX FastCGI cache, please wait..." + # Clean NGINX FastCGI cache + if [ "$ee_clean_fastcgi" = "fastcgi" ]; then if [ -d /var/run/nginx-cache/ ]; then + ee_lib_echo "Cleaning NGINX FastCGI cache, please wait..." rm -rf /var/run/nginx-cache/* &>> $EE_COMMAND_LOG \ || ee_lib_error "Unable to clean FastCGI cache, exit status = " $? fi fi - - if [ "$EE_CLEAN_MEMCACHE" = "memcache" ]; then + + # Clean Memcache + if [ "$ee_clean_memcache" = "memcache" ]; then dpkg --get-selections | grep -v deinstall | grep memcached &>> $EE_COMMAND_LOG \ || ee_lib_error "Memcache not installed, exit status = " $? @@ -33,9 +37,10 @@ function ee_mod_clean() fi fi - if [ "$EE_CLEAN_OPCACHE" = "memcache" ]; then + # Clean OPcache + if [ "$ee_clean_opcache" = "memcache" ]; then ee_lib_echo "Cleaning Memcached, please wait..." wget --no-check-certificate --spider -q https://127.0.0.1:22222/cache/opcache/opgui.php?page=reset \ || ee_lib_error "Unable to clean OPcache, exit status = " $? fi -} \ No newline at end of file +}