Sphinx and jobs service are not working

Hi !
When my VPS reboot, the puma server restart, but not the two other services : sphinx and jobs work
Here’s my .service for you to see where is the error :

[Service]
WorkingDirectory=/root/sharetribe
ExecStart=/bin/bash -lc 'source /root/.profile && source /usr/local/rvm/scripts/rvm && RAILS_ENV=production && bundle exec rake ts:index && bundle exec rake ts:start'
Restart=always
RestartSec=10
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=sharetri
User=root
Group=root
Environment=RAILS_ENV=production

[Install]
WantedBy=multi-user.target

[Service]
WorkingDirectory=/root/sharetribe
ExecStart=/bin/bash -lc ‘source /root/.profile && source /usr/local/rvm/scripts/rvm && RAILS_ENV=production && NODE_ENV=production && bundle exec rake jobs:work’
Restart=always
RestartSec=10
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=sharetri
User=root
Group=root
Environment=RAILS_ENV=production NODE_ENV=production

[Install]
WantedBy=multi-user.target

Probably you should just enable autostart for them:

  systemctl enable sharetribe-sphinx.service
  systemctl enable sharetribe-jobs.service
  systemctl list-unit-files
1 Like

If you are talking about my two service, they are enabled,
If not, I can not find any of the services you give me ! :confused:

Did somebody find a solution ?
I really need to find one and the two service are still not working