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

The name of the pictureThe name of the pictureThe name of the pictureClash 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?










share|improve this question























  • 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















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?










share|improve this question























  • 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













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?










share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 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

















  • 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
















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
















active

oldest

votes











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















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



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














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













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)