From cc152b0c95d6553b3b2544807f5987bbfdabba2a Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Wed, 7 Jul 2021 00:29:40 +0200 Subject: [PATCH] [fix] PATH with no sbin dir --- install_yunohost | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install_yunohost b/install_yunohost index f087008..bedcebf 100755 --- a/install_yunohost +++ b/install_yunohost @@ -228,9 +228,13 @@ function check_assertions() fi fi + # Assert we're root [[ "$(id -u)" == "0" ]] || die "This script must be run as root. On most setups, typing 'sudo -i' can be used to become root." + # Assert we're root + [[ "$PATH" == *"/sbin"* ]] || die "Your environment PATH variable must contains /sbin directory." + # Assert systemd is installed command -v systemctl > /dev/null || die "YunoHost requires systemd to be installed."