1
1
scripts/mobots/df.sh

43 lines
604 B
Bash
Raw Normal View History

2010-06-29 23:31:23 +02:00
## disk_free jabber bot ##
##########################
## configuration section
configfilepath=$(pwd)
if [ -f $configfilepath/df.conf ]; then
source $configfilepath/df.conf
else
echo "Exiting because there is no config file."
exit 1
fi
## default config
if [ -z $logfile ]; then
# using default path
logfile="/var/log/mobots/df.log"
else
echo "using logfile defined in the config file"
fi
## ckeck environment
## get local disks
## check disks
data=$(df -Pl | grep $disk0)
echo $data
## actions (jabber, logfile)
## testing output
echo $logfile
## exiting
exit 0