1. Make an AUTOUPDATE script:
Code: Select all
sudo nano /etc/AUTOUPDATE
Code: Select all
#!/bin/bash
## Automatic updates in Mint 19
sleep 60
/usr/bin/mintupdate-cli upgrade --refresh-cache --yes --only-levels 1,2,3 && /usr/bin/mintupdate-cli upgrade --only-security && /usr/bin/mintupdate-cli upgrade --yes --only-kernel >> /var/log/mintupdate.log
exit 0
Ctrl o
Ctrl x
Code: Select all
sudo chmod a+x /etc/AUTOUPDATE
Code: Select all
sudo nano /etc/systemd/system/autoupdate.service
Code: Select all
[Unit]
Description=My autoupdate script that requires network
After=network.target
[Service]
Type=oneshot
ExecStart=/etc/AUTOUPDATE
[Install]
WantedBy=multi-user.target
Code: Select all
sudo systemctl daemon-reload
sudo systemctl enable autoupdate.service
crontab
. If using user´s crontab
it goes like
Code: Select all
nano AUTOUPDATE-NOTIFICATION
Code: Select all
#!/bin/bash
sleep 150
xterm -geometry 120x100 -fn 7x14 -e dialog --title "UPDATE HISTORY - SCROLL USING ARROWS UP AND DOWN" --textbox /var/log/apt/history.log 40 100
exit 0
Ctrl o
Ctrl x
Code: Select all
chmod +x AUTOUPDATE-NOTIFICATION
crontab
Code: Select all
crontab -e
Code: Select all
@reboot export DISPLAY=:0 && sleep 60 && cd /home/username_here && ./AUTOUPDATE-NOTIFICATION
Ctrl o
Ctrl x
.... command
xdpyinfo | grep display
tell the display(s)For getting dialog working, install Xterm
Code: Select all
apt install xterm
dialog
, use arrow keysEdit: If you have Chrome and/or Opera installed, them have changed their reporisities, and mintupdate requires user to accept that change, so you need to run
apt update
and answer yes (y) when asking, so autoupdate is working again.