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!

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.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.