Skip to content

Commit

Permalink
Refactor module initialization script and systemd unit installation
Browse files Browse the repository at this point in the history
  • Loading branch information
stephdl committed Sep 19, 2024
1 parent 9b3d853 commit 35736d1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions imageroot/actions/create-module/10initialize
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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"

0 comments on commit 35736d1

Please sign in to comment.