diff --git a/imageroot/actions/create-module/10initialize b/imageroot/actions/create-module/10initialize index f6b90ed..de06dd8 100755 --- a/imageroot/actions/create-module/10initialize +++ b/imageroot/actions/create-module/10initialize @@ -20,13 +20,8 @@ podman run -i --rm --replace --name "${MODULE_ID}-init" \ --volume "${CROWDSEC_JOURNAL}":/run/log/journal \ ${CROWDSEC_IMAGE} -install-systemd-units - -systemctl enable --now "${MODULE_ID}.service" -systemctl enable --now "${MODULE_ID}-upgrade-hub.timer" - # Install default collections -podman exec -i ${MODULE_ID} cscli collections install \ +podman exec -i ${MODULE_ID}-init cscli collections install \ crowdsecurity/apache2 \ crowdsecurity/base-http-scenarios \ crowdsecurity/dovecot \ @@ -46,4 +41,10 @@ podman exec -i ${MODULE_ID} cscli collections install \ crowdsecurity/whitelist-good-actors # we need it if we want to ban with IP from country -podman exec -i ${MODULE_ID} cscli parsers install crowdsecurity/geoip-enrich +podman exec -i ${MODULE_ID}-init cscli parsers install crowdsecurity/geoip-enrich + +install-systemd-units + +systemctl enable --now "${MODULE_ID}.service" +systemctl enable --now "${MODULE_ID}-upgrade-hub.timer" +