zapty / forever-service

Provision node script as a service via forever, allowing it to automatically start on boot, working across various Linux distros and OS
https://github.com/zapty/forever-service
MIT License
595 stars 65 forks source link

Doesn't work for Ubuntu 16.04.1 LTS #84

Open nkbaba opened 8 years ago

nkbaba commented 8 years ago

Platform - Ubuntu 16.04.1 LTS initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused Could not provision service Could not add service nodeServer initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused

segfaultex commented 8 years ago

I can confirm this. Seeing the same issue.

ITJamie commented 7 years ago

+1 havint the same issue

`root@SumoLogicCollector:/usr/local/lib/node_modules/airsonos# sudo forever-service install airsonos2 --script bin/index.js forever-service version 0.5.9

Platform - Ubuntu 16.04.1 LTS initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused Could not provision service Could not add service airsonos2 initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused

`

cikez commented 7 years ago

Same issue here. No updates for this to work in 16.04? :)

gubi commented 6 years ago

Same error on Ubuntu 17.04

flaugusto commented 6 years ago

Version 16.04 of ubuntu uses systemd and no longer upstart (used by forever-service). In order for the service to be installed correctly, you must install upstart-sysv:

# apt install upstart-sysv
# update-initframfs -u
# reboot

  After reboot, run the service install command:   # forever-service install myservice --script service.js --start

  The service is installed, but it will not start with the system. To make this happen you should edit the /etc/init.d/rc.local file:     # vi /etc/init.d/rc.local

  Before the rows of functions add the line:

start myservice

Hope this helps ^^!

Ethereumx commented 5 years ago

@flaugusto you meant

sudo update-initramfs -u