OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) gzip: stdin: not in gzip format Re: Re: gzip: stdin: not in gzip format

#24763

JBinkley
Member

If you are running it on startup, you should be seeing something like this:

root@raspberrypi-sprinkler:~# ps -ef | grep python
root 2303 2096 0 Jul09 ? 00:06:29 /usr/bin/python ospi.py 192.168.1.60:8080
root 16020 16011 0 18:36 pts/1 00:00:00 grep python
root@raspberrypi-sprinkler:~#

In my case, I start it in /etc/rc.local, which should look something like this:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
echo "[$(date)] rc.local executing" >> /tmp/rc.local.debug
sleep 30
host=$(hostname -I | sed 's/ *$//g')
port=:8080
cd /home/pi/OSPi/
echo "[$(date)] rc.local starting ospi.py $host$port" >> /tmp/rc.local.debug
/usr/bin/python ospi.py $host$port

exit 0

I added the “sleep 30” because it did not always seem to start properly. After I added that, it seems to start without issue.

I don’t think there would be any issue, by the way, if you just left out the host and port stuff and started with “/usr/bin/python ospi.py 8080”

/joe