Просмотр исходного кода

feat: enhance update process in install script and clean up ICAP service code

Manuel 1 год назад
Родитель
Сommit
28c020181c
2 измененных файлов с 7 добавлено и 4 удалено
  1. 5 0
      install.sh
  2. 2 4
      services/icap_service.py

+ 5 - 0
install.sh

@@ -386,8 +386,13 @@ function main() {
     checkSudo
 
     if [ "$1" = "--update" ]; then
+        echo "Verificando paquetes instalados..."
+        checkPackages
+        echo "Verificando Dependecias de python..."
+        installDependencies
         echo "Actualizando Servicio..."
         updateOrCloneRepo
+        echo "Reiniciando Servicio..."
         systemctl restart squidstats.service
 
         ok "Actualizacion completada! Acceda en: \033[1;37mhttp://IP:5000\033[0m"

+ 2 - 4
services/icap_service.py

@@ -1,4 +1,4 @@
-import os
+""" import os
 import tempfile
 
 import icapclient
@@ -8,9 +8,6 @@ ICAP_PORT = int(os.getenv("ICAP_PORT", 1344))
 
 
 def scan_file_with_icap(file_storage):
-    """
-    file_storage: werkzeug FileStorage (request.files["file"])
-    """
     if file_storage.filename == "":
         return {"error": "No selected file"}, 400
 
@@ -46,3 +43,4 @@ def scan_file_with_icap(file_storage):
             os.remove(temp_path)
         except Exception:
             pass
+ """