Advertisement
HorselessName

Corrigir o Erro "Fail to Umount /var/lib/docker/volumes"

Jan 10th, 2024 (edited)
1,634
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.51 KB | Source Code | 0 0
  1. #!/bin/sh
  2.  
  3. case "$1" in
  4.     start)
  5.         # Comandos a serem executados no início do serviço (se necessário)
  6.         echo "Iniciando o serviço de limpeza do Docker..."
  7.         ;;
  8.     stop)
  9.         echo "Parando os processos do Docker..."
  10.         pkill -f "docker*"
  11.         echo "Desmontando volumes do Docker..."
  12.         umount -lf /var/lib/docker/volumes
  13.         echo "Limpeza do Docker concluída."
  14.         ;;
  15.     *)
  16.         echo "Uso: $0 {start|stop}"
  17.         exit 1
  18.         ;;
  19. esac
  20.  
  21. exit 0
  22.  
Tags: Shell Linux
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement