17
submitted 9 months ago by rescue_toaster@lemm.ee to c/debian@lemmy.ml

New debian user here. I'm using sway and have a script in my waybar config to look for upgrades and indicate if any are available. However, it typically doesn't find anything because I first need to run a sudo apt update first.

I don't really want to figure out someway to do a sudo through this script and was curious how gnome finds updates without me needing to enter a password.

It looks like I can use unattended upgrades to do the apt update.

https://wiki.debian.org/UnattendedUpgrades

though I don't want it to do upgrades until I do a sudo apt upgrade after being notified of upgrades. I created a 02periodic file in /etc/apt/apt.config.d as indicated, but I only included the lines

APT::Periodic::Enable "1";

APT::Periodic::Update-Package-Lists "1";

Will this run an apt update every day for me? Is there any issue I'm unaware of in doing this? Thanks for any help!

you are viewing a single comment's thread
view the rest of the comments
[-] GuyNoIRQ@infosec.pub 1 points 9 months ago

Maybe just allow apt update specifically via the sudoers conf so you can cron job it to run without being prompted for user input, or just run it in cron as root.

this post was submitted on 01 Feb 2024
17 points (100.0% liked)

Debian operating system

2724 readers
1 users here now

Debian is a free operating system (OS) for your computer. An operating system is the set of basic programs and utilities that make your computer run. Debian provides more than a pure OS: it comes with over 59000 packages, precompiled software bundled up in a nice format for easy installation on your machine.

founded 4 years ago
MODERATORS