mirror of
https://github.com/nextcloud/vm.git
synced 2025-10-26 11:27:32 +00:00
automatically restart services (#2459)
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
This commit is contained in:
parent
c6701426fc
commit
33ff2d6288
@ -32,6 +32,16 @@ root_check
|
||||
is_process_running apt
|
||||
is_process_running dpkg
|
||||
|
||||
# Automatically restart services (Ubuntu 22.04)
|
||||
if ! version 16.04.10 "$DISTRO" 20.04.10
|
||||
then
|
||||
if ! grep -r "{restart} = 'a'" /etc/needrestart/needrestart.conf
|
||||
then
|
||||
# Restart mode: (l)ist only, (i)nteractive or (a)utomatically.
|
||||
sed -i "s|#\$nrconf{restart} = .*|\$nrconf{restart} = 'a';|g" /etc/needrestart/needrestart.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check for pending-snapshot
|
||||
if does_snapshot_exist "NcVM-snapshot-pending"
|
||||
then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user