Program stops for some reason, while executed via init.d, but not in nohup call

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have created my own heat-control circuit on my raspberry pi, that controls pumps of my home-heating system.
The program is executed each time, Gnu/Linux starts (I put the program into init.d and made it executable). After each restart, the program is running (checked it via pidof program. However, for some reason, the program stops some when, and I don't know why. After I start the program using the following command:nohup sudo myProgram, the program runs for days. I was just wondering why, and how I can check the reason why the program stops the other way around (init.d).
Furthermore, would it be more reasonable to start a script via init.d that starts the program using nohup?
sysvinit autostart
add a comment |Â
up vote
0
down vote
favorite
I have created my own heat-control circuit on my raspberry pi, that controls pumps of my home-heating system.
The program is executed each time, Gnu/Linux starts (I put the program into init.d and made it executable). After each restart, the program is running (checked it via pidof program. However, for some reason, the program stops some when, and I don't know why. After I start the program using the following command:nohup sudo myProgram, the program runs for days. I was just wondering why, and how I can check the reason why the program stops the other way around (init.d).
Furthermore, would it be more reasonable to start a script via init.d that starts the program using nohup?
sysvinit autostart
Does it also stop randomly under nohup, or did nohup fix the problem? Or do you simply want the init process to restart your program for you automatically? Or is you actual question about why your program stops?
â Jeff Schaller
2 hours ago
If I log in and start the program withnohub sudo program, it will run till the rasperry is deconnected from the power supply; so no stop. However, I want that the program starts after a restart (e.g., power supply is canceled and repowered). Thus, the random stops via the start of init.d has to be fixed
â Tobi
35 mins ago
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have created my own heat-control circuit on my raspberry pi, that controls pumps of my home-heating system.
The program is executed each time, Gnu/Linux starts (I put the program into init.d and made it executable). After each restart, the program is running (checked it via pidof program. However, for some reason, the program stops some when, and I don't know why. After I start the program using the following command:nohup sudo myProgram, the program runs for days. I was just wondering why, and how I can check the reason why the program stops the other way around (init.d).
Furthermore, would it be more reasonable to start a script via init.d that starts the program using nohup?
sysvinit autostart
I have created my own heat-control circuit on my raspberry pi, that controls pumps of my home-heating system.
The program is executed each time, Gnu/Linux starts (I put the program into init.d and made it executable). After each restart, the program is running (checked it via pidof program. However, for some reason, the program stops some when, and I don't know why. After I start the program using the following command:nohup sudo myProgram, the program runs for days. I was just wondering why, and how I can check the reason why the program stops the other way around (init.d).
Furthermore, would it be more reasonable to start a script via init.d that starts the program using nohup?
sysvinit autostart
sysvinit autostart
edited 4 mins ago
ctrl-alt-delor
9,39731949
9,39731949
asked 4 hours ago
Tobi
266
266
Does it also stop randomly under nohup, or did nohup fix the problem? Or do you simply want the init process to restart your program for you automatically? Or is you actual question about why your program stops?
â Jeff Schaller
2 hours ago
If I log in and start the program withnohub sudo program, it will run till the rasperry is deconnected from the power supply; so no stop. However, I want that the program starts after a restart (e.g., power supply is canceled and repowered). Thus, the random stops via the start of init.d has to be fixed
â Tobi
35 mins ago
add a comment |Â
Does it also stop randomly under nohup, or did nohup fix the problem? Or do you simply want the init process to restart your program for you automatically? Or is you actual question about why your program stops?
â Jeff Schaller
2 hours ago
If I log in and start the program withnohub sudo program, it will run till the rasperry is deconnected from the power supply; so no stop. However, I want that the program starts after a restart (e.g., power supply is canceled and repowered). Thus, the random stops via the start of init.d has to be fixed
â Tobi
35 mins ago
Does it also stop randomly under nohup, or did nohup fix the problem? Or do you simply want the init process to restart your program for you automatically? Or is you actual question about why your program stops?
â Jeff Schaller
2 hours ago
Does it also stop randomly under nohup, or did nohup fix the problem? Or do you simply want the init process to restart your program for you automatically? Or is you actual question about why your program stops?
â Jeff Schaller
2 hours ago
If I log in and start the program with
nohub sudo program, it will run till the rasperry is deconnected from the power supply; so no stop. However, I want that the program starts after a restart (e.g., power supply is canceled and repowered). Thus, the random stops via the start of init.d has to be fixedâ Tobi
35 mins ago
If I log in and start the program with
nohub sudo program, it will run till the rasperry is deconnected from the power supply; so no stop. However, I want that the program starts after a restart (e.g., power supply is canceled and repowered). Thus, the random stops via the start of init.d has to be fixedâ Tobi
35 mins ago
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%2f479590%2fprogram-stops-for-some-reason-while-executed-via-init-d-but-not-in-nohup-call%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
Does it also stop randomly under nohup, or did nohup fix the problem? Or do you simply want the init process to restart your program for you automatically? Or is you actual question about why your program stops?
â Jeff Schaller
2 hours ago
If I log in and start the program with
nohub sudo program, it will run till the rasperry is deconnected from the power supply; so no stop. However, I want that the program starts after a restart (e.g., power supply is canceled and repowered). Thus, the random stops via the start of init.d has to be fixedâ Tobi
35 mins ago