mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
Minor improvement of auto-update check
Instead of relying on /etc/apt/apt.conf.d/20auto-upgrades having the according entries we now verify the auto-upgrade entries via apt-config
This commit is contained in:
parent
cd057994d3
commit
4a19dcc807
@ -71,7 +71,10 @@ def subcommand_run(_):
|
||||
|
||||
def subcommand_check_auto(_):
|
||||
"""Check if automatic upgrades are enabled"""
|
||||
print(os.path.isfile(AUTO_CONF_FILE))
|
||||
arguments = ['apt-config', 'shell', 'UpdateInterval',
|
||||
'APT::Periodic::Update-Package-Lists']
|
||||
output = subprocess.check_output(arguments).decode()
|
||||
print(bool(output and "1" in output))
|
||||
|
||||
|
||||
def subcommand_enable_auto(_):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user