I'm looking at some init.d
scripts, and a number of them use this what is essentially this command in their "stop)
" target:
kill $(pidof ${DAEMON_NAME})
The pidof ${DAEMON_NAME}
is actually a script function that checks the status code and calls exit if necessary, nonetheless, How is the above any different than this:
killall ${DAEMON_NAME}
A lot of init.d
script simplification would be had if they are.
EDIT: I should add these "processes" aren't daemons and don't actually record their PID in the FS anywhere ...