|
|
@@ -1,11 +1,12 @@
|
|
|
#!/bin/bash
|
|
|
-# info: remove fast cgi nginx support
|
|
|
+# info: Remove FastCGI nginx support
|
|
|
# options: USER DOMAIN [RESTART]
|
|
|
# labels: hestia web
|
|
|
#
|
|
|
-# example: v-delete-web-domain-fast-cgi-cache user domain.tld
|
|
|
+# example: v-delete-fastcgi-cache user domain.tld
|
|
|
#
|
|
|
-# The function removes fast cgi cache.
|
|
|
+# The function enables FastCGI cache for nginx
|
|
|
+
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
|
# Variable&Function #
|
|
|
@@ -41,16 +42,17 @@ check_hestia_demo_mode
|
|
|
# Load domain data
|
|
|
parse_object_kv_list $(grep "DOMAIN='$domain'" $USER_DATA/web.conf)
|
|
|
|
|
|
-# Remove fast cgi configs
|
|
|
+# Remove FastCGI cache configuration
|
|
|
if [ -f $HOMEDIR/$user/conf/web/$domain/$WEB_SYSTEM.fastcgi_cache.conf ]; then
|
|
|
rm -f $HOMEDIR/$user/conf/web/$domain/$WEB_SYSTEM.fastcgi_cache.conf
|
|
|
fi
|
|
|
|
|
|
-# Delete cache folder on disabling
|
|
|
-if [ -d /var/cache/nginx/php-fpm/$domain ]; then
|
|
|
- rm -rf /var/cache/nginx/php-fpm/$domain
|
|
|
+# Delete FastCGI cache folder
|
|
|
+if [ -d /var/cache/nginx/micro/$domain ]; then
|
|
|
+ rm -rf /var/cache/nginx/micro/$domain
|
|
|
fi
|
|
|
|
|
|
+
|
|
|
#----------------------------------------------------------#
|
|
|
# Hestia #
|
|
|
#----------------------------------------------------------#
|
|
|
@@ -62,14 +64,14 @@ fi
|
|
|
# Set FASTCGI flag to disabled
|
|
|
update_object_value 'web' 'DOMAIN' "$domain" '$FASTCGI_CACHE' ''
|
|
|
|
|
|
-# Restart services if requested
|
|
|
+# Restart web server
|
|
|
if [ ! -z "$restart" ]; then
|
|
|
$BIN/v-restart-web
|
|
|
- check_result $? "Web restart failed" >/dev/null
|
|
|
+ check_result $? "Web server restart failed" > /dev/null
|
|
|
fi
|
|
|
|
|
|
# Logging
|
|
|
-log_history "disabled fast cgi support for $domain"
|
|
|
+log_history "Disabled FastCGI cache for $domain"
|
|
|
log_event "$OK" "$ARGUMENTS"
|
|
|
|
|
|
exit
|