#!/bin/bash process_name="restagent" if ! pgrep -x "$process_name" >/dev/null; then echo "$process_name is not running. Restarting..." systemctl restart keepalived fi