node-linux icon indicating copy to clipboard operation
node-linux copied to clipboard

Support enabling and disabling services

Open RazZziel opened this issue 10 years ago • 3 comments

Besides installing/uninstalling and starting/stopping a service, the user should be able to enable and disable it.

Use case: in my install.js right now I can only install and start my service, but I cannot schedule it for automatic start on every boot, so installation requires manual operation which I'd rather avoid. My target is to be able to run "sudo npm install -g http://my/host/my/package.tgz", and have everything automatically configured for me.

I'm working on this modification:

  • New enable property in the systemv module that runs 'update-rc.d '+this.label+' defaults'
  • New disable property in the systemv module that runs 'update-rc.d -f '+this.label+' remove'

RazZziel avatar Mar 08 '15 10:03 RazZziel

Commited pull request: https://github.com/coreybutler/node-linux/pull/20

RazZziel avatar Apr 24 '15 07:04 RazZziel

This also now works on redhat systems using chkconfig in my pull request #25

sellis avatar Jan 07 '16 03:01 sellis

This issue can now be closed.

sellis avatar Jan 28 '16 18:01 sellis