Added systemd unit file, to allow auto-start/stop of WebODM on systemd based Linux systems.

Pre-Requisites:
- Requires odm user
- Requires docker installed via system (ubuntu: apt-get install docker.io)
- Requires screen to be installed
- Requires odm user member of docker group
- Required WebODM directory checked out to /opt/WebODM
- Requires that /opt/WebODM is recursively owned by odm:odm
If all pre-reqs met, should be able to enable by doing:
systemctl enable /opt/WebODM/service/webodm.service
then reboot.
If you log in as odm user, service will run in a screen session called 'webodm'
So screen -r webodm will pull up console (CTRL+A, D) will close session
systemctl start webodm will start
systemctl status webodm will show process status
systemctl stop webodm will stop it.
It will be auto-started upon crash/error
pull/156/head
OpenDroneMap 2017-04-18 10:05:37 -04:00
rodzic 25f6612026
commit ebd3787ecf
1 zmienionych plików z 15 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,15 @@
[Unit]
Description=Start WebODM OpenDroneMap Service Container
Requires=docker.service
[Service]
Type=forking
User=odm
Group=odm
WorkingDirectory=/opt/WebODM
ExecStart=/bin/bash -c 'screen -dmS webodm /opt/WebODM/webodm.sh start'
ExecStop=/bin/bash -c '/opt/WebODM/webodm.sh stop'
Restart=on-failure
[Install]
WantedBy=multi-user.target