Advertisement
LightProgrammer000

ajustarHoraLinux

Sep 20th, 2022
1,316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.27 KB | Help | 0 0
  1. #!/bin/bash
  2.  
  3. # Comando
  4. clear
  5.  
  6. # Estrutura de decisao: Saber se o arquivo existe
  7. if [[ -f /usr/sbin/ntpdate ]]
  8. then
  9.     ntpdate ntp.ubuntu.com && clear
  10. else
  11.     apt-get -y install ntpdate
  12.     ntpdate ntp.ubuntu.com && clear
  13. fi
  14.  
  15. echo -e "\033[01;31m# Hora Ajustada \033[01;00m"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement