Advertisement
sergio_educacionit

servicio.sh

Dec 14th, 2023
837
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.28 KB | None | 0 0
  1. if ! systemctl is-active apache2.service > /dev/null; then
  2.  
  3.     echo "el servicio apache2 esta detenido"
  4.     echo "iniciando servicio..."
  5.  
  6.     systemctl start apache2
  7.     echo "..."
  8.     journalctl --no-pager -u apache2.service | tail -3
  9.  
  10. else
  11.     echo "el servicio esta en ejecucion.."
  12.  
  13. fi
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement