-
Notifications
You must be signed in to change notification settings - Fork 3
Automating gomotics startup on linux with supervisord
mch1307 edited this page Nov 21, 2017
·
3 revisions
There are several ways to setup gomotics to be started at system boot on linux systems (systemV, upstart,.. ). This small guide will use supervisor to manage the gomotics process
sudo apt-get install supervisor
edit /etc/supervisor/conf.d/gomotics.conf as follows, customize the path of command and the environment variables to your needs:
[program:gomotics]
command=/opt/gomotics/gomotics
autostart=true
autorestart=true
stderr_logfile=/var/log/gomotics.log
stdout_logfile=/var/log/gomotics.log
user=www-data
environment=JEE_APIKEY="jeedom api key",JEE_URL="http://jeedom-host/core/api/jeeApi.php",LOG_LEVEL="INFO",LOG_PATH="stdout",AUTO_CREATE_OBJECTS="Y"
gomotics parameters reference is available here
Update supervisor conf:
sudo supervisorctl reread
sudo supervisorctl update
Start gomotics
sudo supervisorctl start gomotics
Check status
sudo supervisorctl status gomotics
Check the log file in /var/log/gomotics.log
You can change the log level in supervisor config in order to get more information (DEBUG, TRACE, ...)