diff --git a/lib/functions.bash b/lib/functions.bash index c8b769a..7a025d4 100644 --- a/lib/functions.bash +++ b/lib/functions.bash @@ -8,7 +8,7 @@ function assert_root { } function assert_container { - cat /proc/self/cgroup | grep -qE'session-c[0-9]+\.scope' + [[ $(systemd-detect-virt -c) == lxc ]] } function assert_system_mode {