В общем сейчас есть это
[Unit]
Description=Ghost service
# Make sure we have functional network and logging available
After=syslog.target
After=network.target
After=nginx.service
[Service]
# Optional, assign custom user and group for this service
User=ngnix
Group=ngnix
Environment=NODE_ENV="production"
# Allow process forking
ExecStart=/usr/bin/node /path/to/index.js
Type=forking
# Give a reasonable amount of time for the server to start up/shut down
TimeoutSec=10
[Install]
WantedBy=multi-user.target
Получаю вот это:
ghost.service - Ghost service
Loaded: loaded (/etc/systemd/system/ghost.service; enabled)
Active: failed (Result: exit-code) since Ср 2014-03-12 21:04:21 MSK; 10s ago
Process: 23988 ExecStart=/usr/bin/node /path/to/index.js (code=exited, status=217/USER)
мар 12 21:04:21 Starting Ghost service...
мар 12 21:04:21 ghost.service: control process exited, code=exited status=217
мар 12 21:04:21 Failed to start Ghost service.
мар 12 21:04:21 Unit ghost.service entered failed state.
Пытался ставить - перед exec, но не работает.
Руками команда запуска работает.
Прошу помощи.