2020-06-22 19:53:34 -04:00
|
|
|
[Unit]
|
|
|
|
|
Description=Mistborn Wifi Service
|
|
|
|
|
Requires=Mistborn-base.service
|
|
|
|
|
After=Mistborn-base.service
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
Restart=always
|
|
|
|
|
User=root
|
|
|
|
|
Group=docker
|
|
|
|
|
PermissionsStartOnly=true
|
|
|
|
|
# Shutdown container (if running) when unit is stopped
|
2020-06-23 15:05:28 -04:00
|
|
|
EnvironmentFile=/opt/mistborn/.env
|
2020-06-22 19:53:34 -04:00
|
|
|
ExecStartPre=/usr/local/bin/docker-compose -f /opt/mistborn/extra/wifi.yml down
|
|
|
|
|
|
|
|
|
|
ExecStartPre=/usr/local/bin/docker-compose -f /opt/mistborn/extra/wifi.yml build
|
|
|
|
|
# Start container when unit is started
|
|
|
|
|
ExecStart=/usr/local/bin/docker-compose -f /opt/mistborn/extra/wifi.yml up
|
|
|
|
|
# Stop container when unit is stopped
|
|
|
|
|
ExecStop=/usr/local/bin/docker-compose -f /opt/mistborn/extra/wifi.yml down
|
|
|
|
|
# Post stop
|
|
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
|
WantedBy=multi-user.target
|