How to restart a systemctl service from within the process
Karl Auer
kauer at biplane.com.au
Sun Nov 22 12:42:53 UTC 2020
On Sun, 2020-11-22 at 11:54 +0000, Colin Law wrote:
> I am not sure there
> is any way of telling node-red to exit
Signal it - KILL, TERM, HUP. To quote Dave Lister (approximately) "one
swift knee in the happy sack and it'll drop like all the rest".
> plus I don't really want to
> have to override the standard service file for node-red
Add a service file for your project and make it depend on node-red?
The main reason I don't like having to run systemctl is that it means
the project has to run as root. Maybe it has to anyway, I know zip
about node-red.
Personally I think adding a single line to the standard service file is
a way neater and cleaner solution than bodgied up calls to systemctl.
And you can automate adding the lie(s) too, and save that with your
project.
Regards, K.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
GPG fingerprint: 2561 E9EC D868 E73C 8AF1 49CF EE50 4B1D CCA1 5170
Old fingerprint: 8D08 9CAA 649A AFEF E862 062A 2E97 42D4 A2A0 616D
More information about the ubuntu-users
mailing list