Advertisement
danpacu2

Untitled

Apr 4th, 2021
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1.  
  2. #!/bin/bash
  3.  
  4. #primer test de script de comprobación de status de sickchill
  5.  
  6. echo "comprobamos el status del servicio sickchill"
  7. sleep 2s
  8. sudo systemctl status sickchill.service > /dev/null 2>&1
  9.  
  10.  
  11. if [ $? -ne 0 ]
  12. then
  13. echo "el servicio no esta funcionando"
  14. sudo systemctl restart sickhill.service
  15. fi
  16.  
  17. sudo systemctl status sickchill.service > sickchill.txt
  18.  
  19. exit 0
  20.  
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement