1. That means that after 30 minutes I have 10 instances of gpscon running and no data uploaded because my script never passed that line. If I use x=1, the script runs normally but the value is never updated.
kill -SIGTERM $(pidof gpscon)