
I will give an example of a simple script for restarting services if they are not running and sending a notification by email:123456789101112131415161718#!/bin/bashSERVICES="ssh apache2 zabbix-server zabbix-agent mysql smbd nmbd asterisk"DATE=$(date '+%d-%m-%Y %H:%M:%S') for SERVICE in ${SERVICES} do service $SERVICE status 2>&1>/dev/null if...