don't need to write a log file

This commit is contained in:
Patrick McDonagh
2016-11-22 12:41:52 -06:00
parent f4d31bda6a
commit 670b9a4191

View File

@@ -12,7 +12,6 @@ SCRIPT=/root/www/start.sh
RUNAS=poconsole
PIDFILE=/var/run/datalogger.pid
LOGFILE=/var/log/datalogger.log
start() {
if [ -f "$PIDFILE" ] && kill -0 $(cat "$PIDFILE"); then
@@ -20,7 +19,7 @@ start() {
return 1
fi
echo 'Starting service…' >&2
local CMD="$SCRIPT &> \"$LOGFILE\" & echo \$!"
local CMD="$SCRIPT & echo \$!"
su -c "$CMD" $RUNAS
echo 'Service started' >&2
}
@@ -42,7 +41,6 @@ uninstall() {
if [ "$SURE" = "yes" ]; then
stop
rm -f "$PIDFILE"
echo "Notice: log file is not be removed: '$LOGFILE'" >&2
update-rc.d -f datalogger remove
rm -fv "$0"
fi