diff options
author | pks <pks@pks.rocks> | 2021-05-01 06:18:12 +0200 |
---|---|---|
committer | pks <pks@pks.rocks> | 2021-05-01 06:18:12 +0200 |
commit | d99fb40baf87b484b25311b2c5e8170bd2224a7b (patch) | |
tree | bd237902456f85201399d27deb8dd06703feda7e /weather-logger | |
parent | f461190e22a97bde985b067ce01c4ed9c74f7e62 (diff) |
v1
Diffstat (limited to 'weather-logger')
-rwxr-xr-x | weather-logger | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/weather-logger b/weather-logger deleted file mode 100755 index 84be622..0000000 --- a/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 |