#!/bin/bash SERVICE="ais-runner" if ! rc-service $SERVICE status | grep -q "started"; then echo "$(date): $SERVICE is down. Restarting..." >> /var/log/service-monitor.log rc-service $SERVICE restart fi