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
594 stars 65 forks source link

Basic support for Ubuntu 16 #72

Closed kornelski closed 7 years ago

kornelski commented 8 years ago

Added support for current Ubuntu by ignoring existence of systemd and using sysv init instead.

I've changed detection to be based on presence of /sbin/upstart, rather than Ubuntu version, because it can be optionally (re)installed on newer versions.

Plus a minor fix for shell = require('shelljs'); accidentally creating a global variable.

arvind-agarwal commented 8 years ago

@pornel thanks for this, have you tested this in various versions of Ubuntu lower than 15.04 also? The approach is good since at least it will allow services to function without systemd.

I will merge it by next week.

kornelski commented 8 years ago

I've tested it on 15 and 16, with and without upstart installed. I don't have a VM older than that.

billmn commented 7 years ago

News about that?

palodequeso commented 7 years ago

I would love to start using this! :pray:

arvind-agarwal commented 7 years ago

Sorry for delay will make this happen by this weekend.

solexious commented 7 years ago

This new version doens't fix using forever-service with ubuntu 16.04 for me, I get this error on install:

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 client
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused

If I try to install again forever-service complains it is installed until i use forever-service delete

ITJamie commented 7 years ago

Im having the same issue as above. ubuntu 14.x upgraded to 16.04.1 .

`sudo forever-service install airsonosd --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 airsonosd initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused `

jakehowlett commented 7 years ago

Me too

gubi commented 6 years ago

Me too