summaryrefslogtreecommitdiff
path: root/v1/weather-logger
diff options
context:
space:
mode:
authorpks <pks@pks.rocks>2021-05-10 13:23:21 +0200
committerpks <pks@pks.rocks>2021-05-10 13:23:21 +0200
commit281fa36a24f81d87543a7791252954414e161565 (patch)
treeab45e491aa93924f7310303913f2df2d3f3b069f /v1/weather-logger
parent69e11599c2194187e1c172ebe6b7b51945a7f306 (diff)
rm v0 v1
Diffstat (limited to 'v1/weather-logger')
-rwxr-xr-xv1/weather-logger33
1 files changed, 0 insertions, 33 deletions
diff --git a/v1/weather-logger b/v1/weather-logger
deleted file mode 100755
index 84be622..0000000
--- a/v1/weather-logger
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides: weather-logger
-# Required-Start: $all
-# Required-Stop:
-# Default-Start: 2 3 4 5
-# Default-Stop:
-# Short-Description: weather-logger
-### END INIT INFO
-
-export SUFFIX=$(date +'%Y-%m-%d-%H:%M:%S')
-export USER=pks
-export DIR=/home/$USER/weather_logger/
-export PYTHONPATH=/home/$USER/.local/lib/python3.7/site-packages/
-
-case "$1" in
- start)
- echo "Starting weather-logger"
- rm -f $DIR/stop
- #runuser -l $USER -c "source $DIR/env/bin/activate && python $DIR/receive.py 2>$DIR/weather.$SUFFIX.err > $DIR/weather.$SUFFIX.out" &
- runuser -l $USER -c "python3.7 $DIR/receive.py 2>$DIR/log/weather.$SUFFIX.err > $DIR/log/weather.$SUFFIX.out" &
- ;;
- stop)
- echo "Stopping weather-logger"
- runuser -l $USER -c "touch $DIR/stop"
- ;;
- *)
- echo "Usage: /etc/init.d/weather-logger {start|stop}"
- exit 1
- ;;
-esac
-
-exit 0