Systemd: How to stop an enabled process if the user start the same application
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
If process is enabled to start on boot, in this specific case it's a headless qlcplus lighting controller. Is there a way to stop that process if a user later logs in and manually start the full qlcplus GUI application in order to edit the controller file?
I could write a script that disables the systemd process, before starting the qlcplus gui but I'd need to re-enable the systemd process when the GUI exits. I should mention that this system is to be used by lighting technicians (unfamiliar with linux) not computer tech's, so no typing into a CL terminal is allowed.
I could also have a ~/.config/autostart/qlcplus.desktop, I was just curious if there's a systemd way of doing this and|or ensure there's only ever a single instance running.
This is to unsure that the lighting is always controlled even after unattended|unscheduled reboots. Running 2 DMX controller threads is obviously a "bad thing".
System is a raspberry pi with raspbian-stretch.
systemd
add a comment |Â
up vote
1
down vote
favorite
If process is enabled to start on boot, in this specific case it's a headless qlcplus lighting controller. Is there a way to stop that process if a user later logs in and manually start the full qlcplus GUI application in order to edit the controller file?
I could write a script that disables the systemd process, before starting the qlcplus gui but I'd need to re-enable the systemd process when the GUI exits. I should mention that this system is to be used by lighting technicians (unfamiliar with linux) not computer tech's, so no typing into a CL terminal is allowed.
I could also have a ~/.config/autostart/qlcplus.desktop, I was just curious if there's a systemd way of doing this and|or ensure there's only ever a single instance running.
This is to unsure that the lighting is always controlled even after unattended|unscheduled reboots. Running 2 DMX controller threads is obviously a "bad thing".
System is a raspberry pi with raspbian-stretch.
systemd
could you just add a wrapper script to the user application start to determine if the systemd started task is running and if yes then use the running process instead of killing it or launching a dupe ... this is a pattern I use in similar use cases
â Scott Stensland
Feb 17 at 19:20
Would the web interface be sufficient for your techs to use? If so, you wouldn't have to touch the running service at all, and only require a browser on the client.
â ErikF
Feb 18 at 10:32
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
If process is enabled to start on boot, in this specific case it's a headless qlcplus lighting controller. Is there a way to stop that process if a user later logs in and manually start the full qlcplus GUI application in order to edit the controller file?
I could write a script that disables the systemd process, before starting the qlcplus gui but I'd need to re-enable the systemd process when the GUI exits. I should mention that this system is to be used by lighting technicians (unfamiliar with linux) not computer tech's, so no typing into a CL terminal is allowed.
I could also have a ~/.config/autostart/qlcplus.desktop, I was just curious if there's a systemd way of doing this and|or ensure there's only ever a single instance running.
This is to unsure that the lighting is always controlled even after unattended|unscheduled reboots. Running 2 DMX controller threads is obviously a "bad thing".
System is a raspberry pi with raspbian-stretch.
systemd
If process is enabled to start on boot, in this specific case it's a headless qlcplus lighting controller. Is there a way to stop that process if a user later logs in and manually start the full qlcplus GUI application in order to edit the controller file?
I could write a script that disables the systemd process, before starting the qlcplus gui but I'd need to re-enable the systemd process when the GUI exits. I should mention that this system is to be used by lighting technicians (unfamiliar with linux) not computer tech's, so no typing into a CL terminal is allowed.
I could also have a ~/.config/autostart/qlcplus.desktop, I was just curious if there's a systemd way of doing this and|or ensure there's only ever a single instance running.
This is to unsure that the lighting is always controlled even after unattended|unscheduled reboots. Running 2 DMX controller threads is obviously a "bad thing".
System is a raspberry pi with raspbian-stretch.
systemd
asked Feb 17 at 19:15
Mike Evans
61
61
could you just add a wrapper script to the user application start to determine if the systemd started task is running and if yes then use the running process instead of killing it or launching a dupe ... this is a pattern I use in similar use cases
â Scott Stensland
Feb 17 at 19:20
Would the web interface be sufficient for your techs to use? If so, you wouldn't have to touch the running service at all, and only require a browser on the client.
â ErikF
Feb 18 at 10:32
add a comment |Â
could you just add a wrapper script to the user application start to determine if the systemd started task is running and if yes then use the running process instead of killing it or launching a dupe ... this is a pattern I use in similar use cases
â Scott Stensland
Feb 17 at 19:20
Would the web interface be sufficient for your techs to use? If so, you wouldn't have to touch the running service at all, and only require a browser on the client.
â ErikF
Feb 18 at 10:32
could you just add a wrapper script to the user application start to determine if the systemd started task is running and if yes then use the running process instead of killing it or launching a dupe ... this is a pattern I use in similar use cases
â Scott Stensland
Feb 17 at 19:20
could you just add a wrapper script to the user application start to determine if the systemd started task is running and if yes then use the running process instead of killing it or launching a dupe ... this is a pattern I use in similar use cases
â Scott Stensland
Feb 17 at 19:20
Would the web interface be sufficient for your techs to use? If so, you wouldn't have to touch the running service at all, and only require a browser on the client.
â ErikF
Feb 18 at 10:32
Would the web interface be sufficient for your techs to use? If so, you wouldn't have to touch the running service at all, and only require a browser on the client.
â ErikF
Feb 18 at 10:32
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f424849%2fsystemd-how-to-stop-an-enabled-process-if-the-user-start-the-same-application%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
could you just add a wrapper script to the user application start to determine if the systemd started task is running and if yes then use the running process instead of killing it or launching a dupe ... this is a pattern I use in similar use cases
â Scott Stensland
Feb 17 at 19:20
Would the web interface be sufficient for your techs to use? If so, you wouldn't have to touch the running service at all, and only require a browser on the client.
â ErikF
Feb 18 at 10:32