From 0b5c195e170059455a6261d496cf5f9c1ce71869 Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Mon, 11 May 2020 11:07:26 -0400 Subject: [PATCH] upgrades: Add needrestart to restart services as needed Signed-off-by: James Valleroy Reviewed-by: Sunil Mohan Adapa --- plinth/modules/upgrades/__init__.py | 2 +- .../upgrades/data/etc/needrestart/conf.d/freedombox.conf | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 plinth/modules/upgrades/data/etc/needrestart/conf.d/freedombox.conf diff --git a/plinth/modules/upgrades/__init__.py b/plinth/modules/upgrades/__init__.py index 8016d3f36..a70038037 100644 --- a/plinth/modules/upgrades/__init__.py +++ b/plinth/modules/upgrades/__init__.py @@ -17,7 +17,7 @@ version = 3 is_essential = True -managed_packages = ['unattended-upgrades'] +managed_packages = ['unattended-upgrades', 'needrestart'] _description = [ _('Check for and apply the latest software and security updates.') diff --git a/plinth/modules/upgrades/data/etc/needrestart/conf.d/freedombox.conf b/plinth/modules/upgrades/data/etc/needrestart/conf.d/freedombox.conf new file mode 100644 index 000000000..a1853d350 --- /dev/null +++ b/plinth/modules/upgrades/data/etc/needrestart/conf.d/freedombox.conf @@ -0,0 +1,2 @@ +# Automatically restart services when needed. +$nrconf{restart} = 'a';