It is appropriate to use `ps -p` in that place.
Under certain conditions, existing code ``[ "`ps -A -o pid=
| grep -c $PID`" -eq 0 ]`` may behave incorrectly.
For example, if the content of $PID happens to be a short string
(such as `199`), and another process includes the string
(process such as `2199`), then unfortunately `grep -c` will return
positive number even if `199` is not running.
And move init.d last in the documentation.
Using init.d script in a systemd environment will work for jobs start/stop, but restart will not be managed as expected with old init.d system. This may cause confusion, pain and a lot of systemd search time.
+start+ did not read the environment variables. However, e.g. +phased-restart+
did. Also +start+ was implemented quite differently from other actions.
Now +start+ is implemented like the other actions, it respects environment
variables and there's a lot less code duplication going on.