fix(provision): check salt-call is installed
authorJavier Bértoli <jbertoli@curii.com>
Tue, 9 Feb 2021 11:05:26 +0000 (08:05 -0300)
committerJavier Bértoli <jbertoli@curii.com>
Tue, 16 Feb 2021 13:51:28 +0000 (10:51 -0300)
refs #17246
Arvados-DCO-1.1-Signed-off-by: Javier Bértoli <jbertoli@curii.com>

tools/salt-install/provision.sh

index f5b986d1f4702039ed81fe0d34f97f11d7d2524d..1d9ae0fe93ad3cd4b00a467d9e4fda40184ce57a 100755 (executable)
@@ -156,12 +156,12 @@ fi
 apt-get update
 apt-get install -y curl git jq
 
-dpkg -l |grep salt-minion
-if [ ${?} -eq 0 ]; then
+if [ which salt-call ]; then
   echo "Salt already installed"
 else
   curl -L https://bootstrap.saltstack.com -o /tmp/bootstrap_salt.sh
   sh /tmp/bootstrap_salt.sh -XdfP -x python3
+  /bin/systemctl stop salt-minion.service
   /bin/systemctl disable salt-minion.service
 fi