iac/ansible/templates/mcaptcha/mcaptcha.service.j2

35 lines
600 B
Text
Raw Permalink Normal View History

[Unit]
Description=mCaptcha: PoW CAPTCHA system
After=syslog.target
After=network.target
{% if cache_type == 'redis' %}
Wants=redis.service
After=redis.service
{% endif %}
{% if database_type == 'postgres' %}
Wants=postgresql.service
After=postgresql.service
{% endif %}
{% if database_type == 'mariadb' %}
Wants=mariadb.service
After=mariadb.service
{% endif %}
[Service]
RestartSec=2s
Type=simple
User=mcaptcha
Group=mcaptcha
WorkingDirectory=/home/mcaptcha/
ExecStart=/usr/local/bin/mcaptcha
Restart=always
Environment=USER=mcaptcha HOME=/home/mcaptcha
[Install]
WantedBy=multi-user.target