script bash to check that a service is running

Published: 11/09/2019
script bash to check that a service is running
Source: UNIX.STACKEXCHANGE.COM

I have a customised linux version, kernel version is 4.1.15-klk my platform architecture is armv7l GNU/Linux 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

Read more
Related news
Comment
FACEBOOK