В /usr/lib/systemd/system/celery.service:
[Unit]
Description=Celery Nodes Daemon
After=network.target
[Service]
Type=forking
PIDFile=/var/run/celery/main.pid
ExecStart=/usr/bin/python2 /home/myuser/path/to/Django/myproject/manage.py celeryd_multi start w1 --pidfile="/var/run/celery/%n.pid" --logfile="/var/log/celery/%n.log" --cmd="-m celery.bin.celeryd_detach"
ExecStop=/usr/bin/python2 /home/myuser/path/to/Django/myproject/manage.py celeryd_multi stopwait w1 --pidfile="/var/run/celery/%n.pid"
[Install]
WantedBy=multi-user.target
В оболочке:
$ sudo systemctl enable celery.service
ln -s '/usr/lib/systemd/system/celery.service' '/etc/systemd/system/multi-user.target.wants/celery.service'
$ sudo systemctl start celery.service
Job for celery.service failed. See 'systemctl status celery.service' and 'journalctl -xn' for details.
$ sudo systemctl status celery.service
celery.service - Celery Nodes Daemon
Loaded: loaded (/usr/lib/systemd/system/celery.service; enabled)
Active: failed (Result: exit-code) since Пт 2013-03-29 13:22:24 NOVT; 38s ago
Process: 32273 ExecStart=/usr/bin/python2 /home/anarchist/Desktop/Develop/Django/myproject/manage.py celeryd_multi start w1 --pidfile="/var/run/celery/%n.pid" --logfile="/var/log/celery/%n.log" --cmd="-m celery.bin.celeryd_detach" (code=exited, status=1/FAILURE)
В журнале ничего о сельдерее. Как запустить демона сельдерея через systemd?