From c655e092e8ab2a1ac3dde59b9e719bed4a5b5b03 Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Thu, 1 Sep 2022 15:32:26 -0700 Subject: [PATCH] put jail job in background --- bin/vhost-deploy.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/vhost-deploy.sh b/bin/vhost-deploy.sh index cd3671e..9fa5d86 100755 --- a/bin/vhost-deploy.sh +++ b/bin/vhost-deploy.sh @@ -89,7 +89,10 @@ if ! grep -q "^$username:" /etc/passwd; then fi # if jail option is set then jail user if [[ -n $jail ]]; then - /usr/local/bin/vhost-user-jail.sh -u $username > /dev/null 2>&1 + # job is run in the background as it can take about 1 minute to complete + /usr/local/bin/vhost-user-jail.sh -u $username >/dev/null 2>/dev/null & + # pause to give above script time to create jail home dir which is used by vhost-add.sh below + sleep 1 fi fi