Эх сурвалжийг харах

Also restart / reload proxy (#3060)

* Also restart / reload proxy

* Delete only subfolders and files
Jaap Marcus 3 жил өмнө
parent
commit
6f59944c0d

+ 6 - 2
bin/v-purge-nginx-cache

@@ -49,12 +49,12 @@ parse_object_kv_list "$conf"
 
 
 # Purge nginx FastCGI cache
 # Purge nginx FastCGI cache
 if [ -d "/var/cache/nginx/micro/$domain" ]; then
 if [ -d "/var/cache/nginx/micro/$domain" ]; then
-    rm -rf /var/cache/nginx/micro/$domain
+    rm -rf /var/cache/nginx/micro/$domain/*
 fi
 fi
 
 
 # Purge nginx proxy cache
 # Purge nginx proxy cache
 if [ -d "/var/cache/nginx/$domain" ]; then
 if [ -d "/var/cache/nginx/$domain" ]; then
-    rm -rf /var/cache/nginx/$domain
+    rm -rf /var/cache/nginx/$domain/*
 fi
 fi
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -65,6 +65,10 @@ fi
 if [ "$restart" != "no" ]; then
 if [ "$restart" != "no" ]; then
     $BIN/v-restart-web "$restart"
     $BIN/v-restart-web "$restart"
     check_result $? "Web restart failed" > /dev/null
     check_result $? "Web restart failed" > /dev/null
+
+    $BIN/v-restart-proxy "$restart"
+    check_result $? "Proxy restart failed" >/dev/null
+
 fi
 fi
 
 
 # Logging
 # Logging