The DHT11 is not a good model for general programming, and the sample which relies on a LKM makes it more complex. (This is probably necessary for DHT11 because of its timing constraints).
I suggest you try http://wiringpi.com/reference/priority-interrupts-and-threads/
pigpio is excellent code, although the documentation is brief http://abyz.me.uk/rpi/...
It is possible you changed something in your list of repositories or it may even occur from a corrupted file. When you run sudo apt-get update (or use the Refresh button in a package manager), a list of packages will get downloaded from the Ubuntu servers. These files are then stored in /var/lib/apt/lists/. If I'm ever having issues running update my last ...
Your "solution" is the sledgehammer approach.
Editing the sudoers file is not recommended. If you really want to do so it is safer to make a new entry in /etc/sudoers.d (which is used to give user pi passwordless sudo)
If you want all users to be able to run a command setting suid permission is more normal.
sudo chmod a+s /sbin/iwlist
First of all, your script should exit with code 1 if it fails. So systemd will stop to execute the script and does not waste performance for nothing.
You are right with you assumption that you do not match the environment to run the script. You have to know that systemd does not provide an environment by default. That is by definition to always have a ...