mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +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(_):
|
def subcommand_disable_auto(_):
|
||||||
"""Disable automatic upgrades"""
|
"""Disable automatic upgrades"""
|
||||||
try:
|
with open(AUTO_CONF_FILE, 'w') as conffile:
|
||||||
os.rename(AUTO_CONF_FILE, AUTO_CONF_FILE + '.disabled')
|
conffile.write('APT::Periodic::Update-Package-Lists "0";\n')
|
||||||
except FileNotFoundError:
|
conffile.write('APT::Periodic::Unattended-Upgrade "0";\n')
|
||||||
print('Already disabled.')
|
|
||||||
|
|
||||||
|
|
||||||
def subcommand_get_log(_):
|
def subcommand_get_log(_):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user