This commit is contained in:
phil 2023-03-01 10:56:33 +01:00
commit 9b8494b33b
7 changed files with 117 additions and 0 deletions

19
templates/diun.service Normal file
View file

@ -0,0 +1,19 @@
# Managed by Ansible
[Unit]
Description=Diun
Documentation=https://crazymax.dev/diun/
After=syslog.target
After=network.target
[Service]
RestartSec=2s
Type=simple
User={{ diun_user }}
Group={{ diun_user }}
ExecStart={{ diun_binary_path }}/diun serve --config {{ duin_configuration_path }}/{{ duin_configuration_file }} --log-level info
Restart=always
Environment=DIUN_DB_PATH={{ diun_home }}/diun.db
[Install]
WantedBy=multi-user.target

18
templates/diun.yaml Normal file
View file

@ -0,0 +1,18 @@
# Managed by Ansible
db:
path: {{ diun_home }}/diun.db
{% if diun_watch is defined %}
{{ duin_watch }}
{% endif %}
{% if diun_notif is defined %}
notif:
{{ duin_notif | indent(2, false) }}
{% endif %}
{% if diun_providers is defined %}
providers:
{{ duin_providers | indent(2, false) }}
{% endif %}