User Tools

Site Tools


adm:setting_up_systemd_scripts

Zibawa SystemD scripts

sudo nano /etc/systemd/system/zibawa.consumer.service
[Unit]
Description=Consumer3 saves rabbitmq messages to database
After=multi-user.target

[Service]
Type=simple
ExecStart=/home/zibawa/environments/zib3/bin/python /home/zibawa/zibawa/manage.py consumer3
Restart=always
StandardError=syslog
User=zibawa

[Install]
WantedBy=multi-user.target

sudo systemctl daemon-reload
sudo systemctl enable zibawa.consumer.service
sudo systemctl start zibawa.consumer.service
sudo systemctl status zibawa.consumer.service

To see logs

journalctl -u zibawa.consumer.service --since today

If you are interested in running simulations, you can also activate the simulator script

sudo nano /etc/systemd/system/zibawa.simulator.service

adm/setting_up_systemd_scripts.txt · Last modified: 2017/04/10 14:20 by matt