0

I would like to create a script,which will stop/kill a daemon after this one has been started. Therefore my script hat to be executed at boot time after the one which is going to be killed, but I don ́t want it to be executed/launched as a service, is that possible in raspbian?

I have seen this post but there is explained more as service, I have tried it but it doesn ́t seem to work in my case, so I was wondering if I could do it in the old fashion way of setting the sort of S0....sh at /etc/init.d/

Thanks in advance,

Regards!

asked Jun 30, 2016 at 17:36

1 Answer 1

1

I don't understand why you would like to kill a daemon with a script and not simply disable the respective service in the first place... e.g.:

sudo update-rc.d <your daemon service> disable

But you could create a script that checks if the daemon in question is running and kills it if so. You could than use cron to execute this script at regular intervals e.g. every minute or so. Or you can use the special string @reboot to invoke a command at boot time (example). For the last you would need to make sure that the cron service starts after the daemon you want to kill.

answered Jul 1, 2016 at 5:00

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.