Add log directory creation upon running (#14)

* Add log directory creation upon running

* Update module.info
pull/19/merge
trashbo4t 2018-03-06 14:04:35 -05:00 committed by Sebastian Kinne
parent 194526857f
commit 4a8791edbb
2 changed files with 9 additions and 2 deletions

View File

@ -6,5 +6,5 @@
"tetra"
],
"title": "wps",
"version": "1.4"
}
"version": "1.5"
}

View File

@ -6,6 +6,13 @@ export PATH=$PATH:/sd/usr/bin:/sd/usr/sbin
MYTIME=`date +%s`
MYCMD=`cat /tmp/wps.run`
MODULEDIR=/pineapple/modules/wps
LOGDIR=$MODULEDIR/log
# ensure log directory is created
if [ ! -d $LOGDIR ]; then
mkdir $LOGDIR
fi
if [ "$1" = "start" ]; then
eval ${MYCMD}