Simple Watchdog script

 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...
Continue reading Simple Watchdog script

Restarting a Linux Server via Web Browser (PHP)

 After opening and reading every result on Google, I figured it's time to make my own thread somewhere.I'm trying to setup a means of rebooting/doing other system functions through a web interface powered by HTML (for the buttons/text) and PHP (for the execution of the aforementioned functions).I'm unable to get this to work. I've read that I need to add the web user to the sudoers file, and...
Continue reading Restarting a Linux Server via Web Browser (PHP)