mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
upgrades: Keep config file when disabling
Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
parent
5df13f7147
commit
d37ba6217e
@ -89,10 +89,9 @@ def subcommand_enable_auto(_):
|
||||
|
||||
def subcommand_disable_auto(_):
|
||||
"""Disable automatic upgrades"""
|
||||
try:
|
||||
os.rename(AUTO_CONF_FILE, AUTO_CONF_FILE + '.disabled')
|
||||
except FileNotFoundError:
|
||||
print('Already disabled.')
|
||||
with open(AUTO_CONF_FILE, 'w') as conffile:
|
||||
conffile.write('APT::Periodic::Update-Package-Lists "0";\n')
|
||||
conffile.write('APT::Periodic::Unattended-Upgrade "0";\n')
|
||||
|
||||
|
||||
def subcommand_get_log(_):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user