1
1
Fork 0

some changes

This commit is contained in:
David 2010-07-01 18:08:47 +02:00
parent 2c05ce1c82
commit 46e98f68c2
1 changed files with 17 additions and 1 deletions

View File

@ -6,7 +6,23 @@
## configuration section (does a simple check if the configfile exists)
configfilepath=$(pwd)
configfilepath=/home/david/Documents/sn/scripts/mobots
logfile="df.log"
logfilepath="/var/log/mobots"
if [ "$(whoami)" = "root" ]; then
## check if logfile/path exists
if [ -f $logfilepath/$logfile ]; then
echo "Starting up df mbot script" >> $logfilepath/$logfile
else
mkdir -p $logfilepath
touch $logfilepath/$logfile
echo "Starting up df mbot script" >> $logfilepath/$logfile
fi
else
echo "Starting up df mbot script w/o logfile."
fi
if [ -f $configfilepath/df.conf ]; then
source $configfilepath/df.conf
else