From cbfdd7b84b147f52dbd58f74ceb19a0abe5fc785 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Fri, 11 Aug 2023 16:54:22 +0200 Subject: [PATCH] install needrestart if not existing (#2543) Signed-off-by: Daniel Hansson --- nextcloud_update.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nextcloud_update.sh b/nextcloud_update.sh index 905c0ef1..ae545501 100644 --- a/nextcloud_update.sh +++ b/nextcloud_update.sh @@ -35,6 +35,10 @@ is_process_running dpkg # Automatically restart services (Ubuntu 22.04) if ! version 16.04.10 "$DISTRO" 20.04.10 then + if [ ! -f /etc/needrestart/needrestart.conf ] + then + install_if_not needrestart + fi if ! grep -rq "{restart} = 'a'" /etc/needrestart/needrestart.conf then # Restart mode: (l)ist only, (i)nteractive or (a)utomatically.