some changes
This commit is contained in:
parent
2c05ce1c82
commit
46e98f68c2
18
mobots/df.sh
18
mobots/df.sh
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue