Browsing articles in "Linux and Unix – Scripts"

Linux’s bash shell script – Check running program

Since I have develop a script code to do automatic synchronize files between server and clients. The code is designed to run in background. To make sure that the program is still running the following code is used to recognize the running process. #!/bin/sh SERVICE=’httpd’ if ps ax | grep -v grep | grep $SERVICE > /dev/null then echo “$SERVICE service running, everything is fine” else echo “$SERVICE is not running” echo “$SERVICE is not […]

Member Area