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

systemd support

Open coreybutler opened this issue 12 years ago • 9 comments
trafficstars

Add support for systemd style services.

coreybutler avatar Jun 07 '13 22:06 coreybutler

Do check out the systemd module if you're looking into this. I already solved some of the problems there. Let's join forces to make both modules great (rather than duplicate work).

rubenv avatar Jun 08 '13 15:06 rubenv

I looked at the systemd module before but really didn't have time to look at it enough to make any kind of educated decision about using it. I wouldn't mind leveraging it in node-linux so long as the resulting node-windows/mac/linux APIs remain consistent. That is a key requirement for me, since these 3 modules are used interchangeably in a larger platform called NGN to deploy scripts as processes.

coreybutler avatar Jun 08 '13 16:06 coreybutler

If you're talking about this package, it looks like it's meant for integrating the sockets of a node app with systemd, rather than starting a node app with systemd, which is the target for node-linux, and at least in that page it's done manually.

Either way, I've started writing a systemd module for node-linux for installation/uninstallation/enabling/disabling/starting/stopping of services

RazZziel avatar Mar 08 '15 10:03 RazZziel

Any development on this one? @RazZziel want to join forces for implementing this enhancement? Doesn't look like a lot of work to do.

MayaLekova avatar Apr 08 '15 13:04 MayaLekova

@RazZziel @MayaLekova - My time has been pretty consumed recently, so I want to express my thanks in advance for the efforts you've started on.

My goal with this project was to be part of the great trilogy, i.e. a common API for Windows/Mac/Linux so the general node developer doesn't have to think about how to launch a daemon, regardless of the OS. I started work on a new general version and got held up with other things. I'd be happy to have a discussion (Gitter, Hipchat, etc) around systemd efforts and some of the plans I had revolving around the other operating systems. I really don't think systemd efforts would be altered by this, but I have toyed with the idea of utilizing a Go wrapper (which stems more from Window's use of winsw). The bigger point in all of this is I'm happy to discuss... this project (and the others) has been stagnant for longer than I'd hoped and collaboration could definitely change that.

coreybutler avatar Apr 08 '15 14:04 coreybutler

Hi! Actually I have around 50% of the systemd integration implemented, but still haven't found the time to test it, organize the changes and push them to my fork. I'll try to do it within this week, and afterwards we can comment.

RazZziel avatar Apr 09 '15 08:04 RazZziel

Thank you for answering! It's always good to have someone else around when the time goes short, and imho the idea for common API for services on all 3 platforms is worth the work :) I'd be happy to discuss some ideas. I'll most probably be writing systemd+upstart module this week (although still haven't decide what the API will be). For the Windows module maybe a good option will be a native one - something similar to QtService, but using libuv instead of Qt's utlities. Although this already seems a large task.

MayaLekova avatar Apr 13 '15 15:04 MayaLekova

Implemented and working, at least on my laptop Commited pull request: https://github.com/coreybutler/node-linux/pull/18

RazZziel avatar Apr 24 '15 07:04 RazZziel

Is this issue solved with the merge and available in the published npm module?

megastef avatar Jul 07 '15 08:07 megastef