upsys
This commit is contained in:
parent
7f0710892a
commit
ccf3f00a7d
20
upsys
Normal file
20
upsys
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
_cyan(){ /bin/echo -e "\033[0;36m$@\033[0m"; }
|
||||||
|
_red(){ /bin/echo -e "\033[0;31m$@\033[0m"; }
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
|
if [ "$EUID" -ne 0 ]; then
|
||||||
|
_red "\n Você deve ser root para executar este script!\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
_cyan "\nAtualizando APT..."
|
||||||
|
apt clean && apt autoclean && apt autoremove -y
|
||||||
|
|
||||||
|
_cyan "\nAtualizando os pacotes instalados.."
|
||||||
|
apt update && apt dist-upgrade -y
|
||||||
|
|
||||||
|
_cyan "\nRemovendo logs antigos do systemd..."
|
||||||
|
journalctl --vacuum-time=1d
|
||||||
Loading…
x
Reference in New Issue
Block a user