ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    How to configure automatic updates on Ubuntu 18.04 LTS

    IT Discussion
    ubuntu 18.04 automatic updates postfix unattended-upgrades
    6
    23
    2.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • IRJI
      IRJ @black3dynamite
      last edited by

      @black3dynamite said in How to configure automatic updates on Ubuntu 18.04 LTS:

      @IRJ said in How to configure automatic updates on Ubuntu 18.04 LTS:

      @black3dynamite said in How to configure automatic updates on Ubuntu 18.04 LTS:

      @IRJ said in How to configure automatic updates on Ubuntu 18.04 LTS:

      @black3dynamite said in How to configure automatic updates on Ubuntu 18.04 LTS:

      Thank you for the how-to.
      I am too spoiled on how to configure auto updates for Fedora and CentOS.

      yeah this is actually easier than fedora imo

      I don't know about that. I've done so many setups now that I script it.

      # Install dnf-automatic
      sudo dnf -y install dnf-automatic
      
      [email protected]
      [email protected]
      EMAILHOST=smtp.domain.com
      sudo sed -i "s|^email_to = root|email_to = ${EMAILTO}|" /etc/dnf/automatic.conf
      sudo sed -i 's|^apply_updates = no|apply_updates = yes|' /etc/dnf/automatic.conf
      sudo sed -i 's|^emit_via = stdio|emit_via = email|' /etc/dnf/automatic.conf
      sudo sed -i "s|^email_from = [email protected]|email_from = ${EMAILFROM}|" /etc/dnf/automatic.conf
      # Enable and Start dnf-automatic.timer
      sudo systemctl enable --now dnf-automatic.timer
      

      Are you installing postfix as well?

      No, but I do have a postfix relay server setup for that purpose.

      Where do you configure that on the client?

      black3dynamiteB 1 Reply Last reply Reply Quote 0
      • black3dynamiteB
        black3dynamite @IRJ
        last edited by

        @IRJ said in How to configure automatic updates on Ubuntu 18.04 LTS:

        @black3dynamite said in How to configure automatic updates on Ubuntu 18.04 LTS:

        @IRJ said in How to configure automatic updates on Ubuntu 18.04 LTS:

        @black3dynamite said in How to configure automatic updates on Ubuntu 18.04 LTS:

        @IRJ said in How to configure automatic updates on Ubuntu 18.04 LTS:

        @black3dynamite said in How to configure automatic updates on Ubuntu 18.04 LTS:

        Thank you for the how-to.
        I am too spoiled on how to configure auto updates for Fedora and CentOS.

        yeah this is actually easier than fedora imo

        I don't know about that. I've done so many setups now that I script it.

        # Install dnf-automatic
        sudo dnf -y install dnf-automatic
        
        [email protected]
        [email protected]
        EMAILHOST=smtp.domain.com
        sudo sed -i "s|^email_to = root|email_to = ${EMAILTO}|" /etc/dnf/automatic.conf
        sudo sed -i 's|^apply_updates = no|apply_updates = yes|' /etc/dnf/automatic.conf
        sudo sed -i 's|^emit_via = stdio|emit_via = email|' /etc/dnf/automatic.conf
        sudo sed -i "s|^email_from = [email protected]|email_from = ${EMAILFROM}|" /etc/dnf/automatic.conf
        # Enable and Start dnf-automatic.timer
        sudo systemctl enable --now dnf-automatic.timer
        

        Are you installing postfix as well?

        No, but I do have a postfix relay server setup for that purpose.

        Where do you configure that on the client?

        Looking over my post, I left out the email_host setting.
        You will enter the name, domain or IP address of the email host
        50ffd3fe-b4c3-440e-9327-17d824eecaee-image.png

        1 Reply Last reply Reply Quote 0
        • DanpD
          Danp @IRJ
          last edited by

          @IRJ said in How to configure automatic updates on Ubuntu 18.04 LTS:

          Scripted a bit for anyone interested

          FWIW, this line didn't work for me --

          sed -i '/Unattended-Upgrade::Skip-Updates-On-Metered-Connections "true"/a\\        "${distro_id}:${distro_codename}-updates";
          ' /etc/apt/apt.conf.d/50unattended-upgrades
          

          I believe this is due to the line being inserted outside the Unattended-Upgrade::Allowed-Origins grouping.

          1 Reply Last reply Reply Quote 0
          • 1
          • 2
          • 2 / 2
          • First post
            Last post