archivo

Virtualmin


#!/bin/bash
# checking if webmin or usermin are not running
# In case they are not running, start them
declare -a units=("webmin" "usermin");
for u in ${units[@]}
do
procs=`ps -Af | grep $u | grep -v 'grep\|keep-webmin-virtualmin-up.sh'`;
if [ -z "$procs" ]
then
echo "There is no $u procceses, so I will start it";
/usr/bin/service $u start;
else
echo "$procs";
fi
done