From d0a338f8c22bdf4fff8e3c221cca0886cb97bdef Mon Sep 17 00:00:00 2001 From: Matheson Steplock Date: Wed, 23 Mar 2022 00:47:35 +0000 Subject: [PATCH] Switch to cgroupv1 --- homeassistant-supervised/DEBIAN/postinst | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/homeassistant-supervised/DEBIAN/postinst b/homeassistant-supervised/DEBIAN/postinst index 641e487..042c130 100755 --- a/homeassistant-supervised/DEBIAN/postinst +++ b/homeassistant-supervised/DEBIAN/postinst @@ -131,7 +131,18 @@ systemctl start hassio-supervisor.service info "Installing the 'ha' cli" chmod a+x "${PREFIX}/bin/ha" +# Switch to cgroup v1 +if ! grep -q "systemd.unified_cgroup_hierarchy=false" /etc/default/grub; then + info "Enable cgroup v1" + cp /etc/default/grub /etc/default/grub.bak + sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT="/&systemd.unified_cgroup_hierarchy=false /' /etc/default/grub + update-grub + touch /var/run/reboot-required +fi info "Within a few minutes you will be able to reach Home Assistant at:" info "http://homeassistant.local:8123 or using the IP address of your" -info "machine: http://${IP_ADDRESS}:8123" \ No newline at end of file +info "machine: http://${IP_ADDRESS}:8123" +if -f /var/run/reboot-required; then + info "A reboot is required to apply changes to grub." +fi \ No newline at end of file