Server monitoring tools

This commit is contained in:
Serghey Rodin 2015-09-09 16:45:09 +03:00
commit 841c97982f
10 changed files with 586 additions and 9 deletions

46
bin/v-list-sys-mail-status Executable file
View file

@ -0,0 +1,46 @@
#!/bin/bash
# info: list mail status
# options: [FORMAT]
#
# The function lists mail server status
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Argument defenition
#format=${1-shell}
# Includes
#source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Checking mail system
if [ -z "$MAIL_SYSTEM" ]; then
exit
fi
# Displaying exim queue status
echo "Exim queue status"
exim -bp
echo -en "\n-------------------------------------"
echo -en "-------------------------------------\n\n"
# Displaying exim stats
if [ -e "/var/log/exim4/mainlog" ]; then
eximstats /var/log/exim4/mainlog 2>/dev/null
else
eximstats /var/log/exim/main.log 2>/dev/null
fi
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
exit