mirror of
https://github.com/mtan93/unifi-linux-utils.git
synced 2026-03-08 05:31:58 +00:00
Update docker-unifi.service
This commit is contained in:
@@ -2,29 +2,18 @@
|
|||||||
# by Rogier Lommers
|
# by Rogier Lommers
|
||||||
# Last updated December 10, 2016
|
# Last updated December 10, 2016
|
||||||
|
|
||||||
# Instructions:
|
# This service file assumes a Docker container is available. If not, create one with:
|
||||||
# 1. Install Docker, Java, MongoDB, and UniFi Controller
|
# 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
|
||||||
# (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]
|
[Unit]
|
||||||
Description=Daemon for Unifi
|
Description=Unifi controller
|
||||||
After=docker.service
|
|
||||||
Wants=
|
|
||||||
Requires=docker.service
|
Requires=docker.service
|
||||||
|
After=docker.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Restart=on-failure
|
Restart=always
|
||||||
StartLimitInterval=20
|
ExecStart=/usr/bin/docker start -a unifi-controller
|
||||||
StartLimitBurst=5
|
ExecStop=/usr/bin/docker stop -t 3 unifi-controller
|
||||||
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]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=default.target
|
||||||
|
|||||||
Reference in New Issue
Block a user