So I tried everything and i am thinging if there is some difficulty because we run openhabian on rasp3 model b.
So I want to run a script to enable the fan in order to cool rasp cpu at boot.
the script is running perfect manually .NAME: run-fan.py . I placed it to folder ./fan/run-fan.py
then
Via Putty
$ sudo chmod +x ./fan/run-fan.py (without error)
$ cd /etc/init.d
$ sudo nano
#!/bin/sh
### BEGIN INIT INFO
# Provides: run-fan.py
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start fan script at boot time
# Description: Enable service provided by daemon.
### END INIT INFO
python .fan/run-fan.py
saved with the name “fan”
$ cd
$ sudo update-rc.d fan defaults (without error)
What i am doing wrong?