Hi team,
I want to start the dashboard using systemd, but this scenario fails
[Unit]
Description=Crowdsec Dashboard
Documentation=https://docs.crowdsec.net/docs/observability/dashboard
Wants=network-online.target docker.service crowdsec.service
After=network-online.target docker.service crowdsec.service
[Service]
Type=simple
ExecStart=cscli dashboard start
ExecStop=cscli dashboard stop
[Install]
WantedBy=multi-user.target
The cause seems to be that “cscli dashboard start” expects a “Return” after start “CrowdSec takes no responsibility for the security of your metabase instance. Do you accept these responsibilities ? (Y/n)”
So I changed to
[Unit]
Description=Crowdsec Dashboard
Documentation=https://docs.crowdsec.net/docs/observability/dashboard
Wants=network-online.target docker.service crowdsec.service
After=network-online.target docker.service crowdsec.service
[Service]
Type=simple
ExecStart=cscli_dashboard_start
ExecStop=cscli dashboard stop
[Install]
WantedBy=multi-user.target
The start command looks like this
#!/usr/bin/env expect
spawn "cscli" dashboard start
expect "CrowdSec takes no responsibility for the security of your metabase instance. Do you accept these responsibilities ?" { send "\r" }
interact
Unfortunately this does not work either,
can you please verify, and best of all give a solution for this problem?
Martin.