From d983287b04c6b64b435f0996826d099ec545c8d1 Mon Sep 17 00:00:00 2001 From: ronivay Date: Sat, 4 Apr 2020 20:53:53 +0300 Subject: [PATCH] skip couple steps from installation if XOUSER is root since this variable is nowadays always set --- xo-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xo-install.sh b/xo-install.sh index 74907a0..a9f2c90 100755 --- a/xo-install.sh +++ b/xo-install.sh @@ -274,7 +274,7 @@ function InstallXO { # Create user if doesn't exist (if defined) - if [ $XOUSER ]; then + if [[ "$XOUSER" != "root" ]]; then if [[ -z $(getent passwd $XOUSER) ]]; then echo echo -ne "${PROGRESS} Creating missing $XOUSER user" @@ -454,7 +454,7 @@ function InstallXO { echo -e "${INFO} Symlinking fresh xo-web install/update to $INSTALLDIR/xo-web" ln -sfn $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/xo-web $INSTALLDIR/xo-web - if [ $XOUSER ]; then + if [[ "$XOUSER" != "root" ]]; then chown -R $XOUSER:$XOUSER $INSTALLDIR/xo-builds/xen-orchestra-$TIME if [ ! -d /var/lib/xo-server ]; then