Browse Source

Small fixes

Joachim M. Giæver 5 years ago
parent
commit
8ef5f5a37d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      bin/lxcbuild

+ 3 - 1
bin/lxcbuild

@@ -93,7 +93,9 @@ function init_container {
 		fi
 		fi
 
 
 	else
 	else
-		lxc start "${CONTAINER_NAME}"
+		if [ $(lxc info "${CONTAINER_NAME}" | grep "Running" | wc -l) -eq 0 ]; then
+			lxc start "${CONTAINER_NAME}"
+		fi
 	fi 
 	fi 
 	container_sh "echo '* Container initialized'"
 	container_sh "echo '* Container initialized'"
 	if [ $? -ne 0 ]; then
 	if [ $? -ne 0 ]; then