• How To Set Automatic Updates Without User Intervention?


    Hi folks,

    We just installed Antergos (Mate desktop choice) on an old Dell machine, at one of our apartment communities, in our clubhouse for our residents to use. As of yesterday the machine was up-to-date, but we would like to setup automatic updates because the staff at that property are too busy to remember to check once in a while. We tried looking in the update settings for “check this box to update automatically” but it did not appear to exist. Is there a tweak tool we can install or something we can copy & paste into the terminal to make the updates happen without any user intervention?

    This already happens mandatory now on Windows 10, but we do not want Windows on that machine as before the computer was always getting viruses - which is why we went with Linux.

    Thanks and we appreciate any help and advice you can give…

  • @herohlyphic
    Hi!
    I don’t knoe if there is any package that can do what you want :(

    I found this site may cover what you’re looking for. (anyway will demand some work from you)
    http://www.techrapid.co.uk/2017/04/automatically-update-arch-linux-with-systemd.html?showComment=1493989428874

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • @heroglyphic You have to do it manually as @fernandomaroto suggested.

    But, I would recommend against it. Every once in a while, updates require user intervention which are always posted in https://www.archlinux.org/ and occasionally may break your system. Or, system may require reboot - ie. after kernel update.

    Also, you dont need to have each update at that instant. Anyone who understands a bit arch linux, can regularly check the updates remotely, say biweekly even monthly. Of course, critical security updates should be done right away.

  • If you feel you must auto-update your system, (although it is normally not recommended due to the reasons stated above by @psscnp142) I know of two easy “hacks”.

    1. open up ‘bashrc’ in Home and add echo "root_password" | sudo -S pacman -Syu --noconfirm to the end of the file. This will cause it to be run whenever you open your terminal. If you do not use the terminal too often, this might be a good option.

    2. This one is the better of the two. Just install startup-settings from Github by running these commands:

    • sudo pacman -Scc --noconfirm
    • yes | sudo pacman -S gcc-multilib git make gtk3
    • git clone https://github.com/hant0508/startup-settings.git
    • cd startup-settings
    • make
    • sudo make install

    NOTE: This program is only needed if your DE does not offer the addition of scripts (commands to be run) when logging in to your computer (aka. starting it up), such as Gnome. KDE however, already offers this in their startup settings.

    Once installed, just open it up and add echo "root_password" | sudo -S pacman -Syu --noconfirm to it. and click the bar that reads “add to autostart”. 0_1501440556723_startup-settings.png
    And now you’re done!

    Hope this helps:grinning:.

    Keep trying, never give up. In the end, you will find that it was all worth it

    Just have some relatives over. Be back in about a week

    Community ISO: https://antergoscommunityeditions.wordpress.com
    Linux Basics: https://linuxbasicssite.wordpress.com

  • @heroglyphic, hi, its not recommended, but you try:
    1- Install cron if not…
    2- Run as root: crontab -e
    3- Copy-paste this to your crontab:

    LOGFILE=/var/log/cron-pacman.log

    # 1. minute (0-59)
    # | 2. hour (0-23)
    # | | 3. day of month (1-31)
    # | | | 4. month (1-12)
    # | | | | 5. day of week (0-7: 0 or 7 is Sun, or use names)
    # | | | | | 6. commandline
    # | | | | | |
    # min hr dom mon dow command
    00 30 * * * . /etc/profile && (echo; date; pacman -Syuq --noconfirm) &>>$LOGFILE || (echo ‘pacman failed!’; tail $LOGFILE; false)

    4- To check every */time you must use e.g. */2 to check every 2 min or any other time value.
    5- If you want to automatically reboot your computer upon a successful upgrade, append ‘&& reboot’ to the above line.

  • I do not think it will be a good working solution.
    If a update fails, may only because the user shut down at the wrong moment, on a kernel update, the system will not boot anymore…
    Archlinux and so on Antergos as rolling release distro is not made for automatic updates!
    You will allways need a guy to run in if something went bad on an update, if the user at the machine is not able to handle this.

    Better solution would be to have someone doing this ones a week by hand or over ssh, if you strictly want Antergos on this machine.

    [updates once a week] = [90% less problems]
    [Li{u}n//u//{i}x] since 1988 - overcoming failure means success
    http://kamprad.net/howto-installing-antergos/
    how to add system logs

  • @joekamprad Hi, I agree, I warned at first, I just gave a suggestion as a study case.

intervention1 automatic4 updates30 Posts 7Views 179
Log in to reply