I have a customised linux version, kernel version is
4.1.15-klk my platform architecture is
I am trying to check if my process is running or not :
I tried this:
#!/bin/sh service=myservice if [ $(ps | grep -v grep | grep $service | wc -l) -gt 0 ] then echo "$service is running!!!" else echo "$service is not running!!!" fi
but it is giving me "myservice is running!!!" whether it is running or not
I can't use pgrep since it is not available in my system
any ideas? thanks!