Linux Automation

From Coolscript
Revision as of 20:12, 14 December 2020 by Admin (talk | contribs) (Created page with "=Setup a proxy server for apt= echo 'Acquire::http::Proxy "http://myserver.com.com:port";' > /etc/apt/apt.conf =Update using apt= apt-get -y upgrade -s apt-get -y upgr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Setup a proxy server for apt

echo 'Acquire::http::Proxy "http://myserver.com.com:port";' > /etc/apt/apt.conf

Update using apt

apt-get -y  upgrade -s
apt-get -y  upgrade -s; logger "APT has been applied"
unattended-upgrade --dry-run -d

=Automatic update using crontab

#echo 'MAILTO=""' > mycron
#echo "00 05 * * * apt-get -y upgrade -s | logger" >> mycron
#crontab mycron
#rm mycron