Skip to content

Commit

Permalink
Switch to cgroupv1 (home-assistant#201)
Browse files Browse the repository at this point in the history
* Switch to cgroupv1

* change wording

* warn user

* fix if statement
  • Loading branch information
ikifar2012 authored Mar 23, 2022
1 parent 4310fa6 commit ceb01be
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion homeassistant-supervised/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,19 @@ 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 "Switching to 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"
info "machine: http://${IP_ADDRESS}:8123"
if [ -f /var/run/reboot-required ]
then
warn "A reboot is required to apply changes to grub."
fi

0 comments on commit ceb01be

Please sign in to comment.