paulbsd-salt/states/micromdm/micromdm.service.j2

18 lines
765 B
Django/Jinja

{%- from "micromdm/map.jinja" import micromdm with context -%}
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
[Unit]
Description=Mobile Device Management server
Documentation=https://github.com/micromdm/micromdm
After=network-online.target
[Service]
User={{ micromdm.user.name }}
Group={{ micromdm.group.name }}
LimitNOFILE=65536
ExecStart={{ micromdm.install_dir }}/micromdm/micromdm serve -http-addr :{{ micromdm.port }} --config-path={{ micromdm.config_path }} -server-url={{ micromdm.url }} -api-key={{ micromdm.api_key }} -filerepo={{ micromdm.filerepo }} -tls={{ micromdm.tls }} -command-webhook-url={{ micromdm.command_webhook_url }}
KillMode=control-group
Restart=on-failure
[Install]
WantedBy=multi-user.target
Alias=micromdm.service