[SOLVED] Start python script on Boot (rasp3 model b - openHAB 2.5.0~M1-1 (Milestone Build))

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
Via Putty
$ sudo chmod +x ./fan/run-fan.py (without error)
$ cd /etc/init.d
$ sudo nano

# 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.
python .fan/run-fan.py

saved with the name “fan”
$ cd
$ sudo update-rc.d fan defaults (without error)

What i am doing wrong?

Raspbian hasn’t used init.d for sure some time. You need to search for systemd tutorials and examples.

1 Like

systemd worked. thnx