change init script set_pidfile() to get pid in a more generic way

the function set_pidfile() in the init script have the process name is hardcoded and uses many pipe,
I've change it to use the pgrep and to use (the already defined) $DAEMON and $ARGS arguments to grep the pid.