mirror of
https://github.com/mtan93/unifi-linux-utils.git
synced 2026-03-08 05:31:58 +00:00
31 lines
901 B
Desktop File
31 lines
901 B
Desktop File
# UniFi Controller systemd Docker Service File
|
|
# by Rogier Lommers
|
|
# Last updated December 10, 2016
|
|
|
|
# Instructions:
|
|
# 1. Install Docker, Java, MongoDB, and UniFi Controller
|
|
# (see https://hub.docker.com/r/goofball222/unifi/ for
|
|
# Docker-specific info)
|
|
# 2. Save this file as /etc/systemd/system/docker-unifi.service
|
|
# 3. Create 'ubnt' user on your system
|
|
# 4. Run 'systemctl enable docker-unifi.service'
|
|
|
|
[Unit]
|
|
Description=Daemon for Unifi
|
|
After=docker.service
|
|
Wants=
|
|
Requires=docker.service
|
|
|
|
[Service]
|
|
Restart=on-failure
|
|
StartLimitInterval=20
|
|
StartLimitBurst=5
|
|
TimeoutStartSec=0
|
|
Environment="HOME=/root"
|
|
|
|
ExecStart=/usr/bin/docker run --name unifi-controller --net host -v /srv/services/unify:/usr/lib/unifi/data -v /srv/services/unify:/usr/lib/unifi/logs -v /srv/services/unify:/var/log/supervisor goofball222/unifi
|
|
ExecStop=-/usr/bin/docker stop unifi
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|