Running check is supported only in procd scripts. This cause prolonged
execution time since the function needs to timeout.
To fix this check if the script USE_PROCD and run running check only if
supported.
Also provide running info only if the running check is supported.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Currently we stop searching at the first occurence of START or STOP
entry. This is wrong since we totally miss the other data (START or
STOP) in the occurence of the other.
Fix and improve script scanning by:
- Increase the line max length to 255 char to read it in one go.
- Scan only the first 10 lines.
- Don't stop at the first occurence and try to search also for the other
data.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>