Browse Source

wizard: fix unattended mode (#57)

erenJag 5 years ago
parent
commit
6bee95b368
1 changed files with 4 additions and 4 deletions
  1. 4 4
      wizard.sh

+ 4 - 4
wizard.sh

@@ -455,10 +455,10 @@ main() {
         ${CSCLI_BIN_INSTALLED} api register >> /etc/crowdsec/config/api.yaml || ${CSCLI_BIN_INSTALLED} api reset >> /etc/crowdsec/config/api.yaml || log_err "unable to register, skipping crowdsec api registration"
         log_info "Crowdsec api registered"
 
-
-        (systemctl start crowdsec && log_info "crowdsec started") || log_err "unable to start crowdsec. exiting"
-
-        ${CSCLI_BIN_INSTALLED} api pull
+        if [[ ${SILENT} == "false" ]]; then
+            (systemctl start crowdsec && log_info "crowdsec started") || log_err "unable to start crowdsec. exiting"
+            ${CSCLI_BIN_INSTALLED} api pull
+        fi;
         # Set the cscli api pull cronjob 
         setup_cron_pull