added gpio off function on service stop
This commit is contained in:
parent
f7f63a00f9
commit
5edbc8109e
5
gpio_off.py
Normal file
5
gpio_off.py
Normal file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
if __name__ == "__main__":
|
||||
pins = list(range(0,40))
|
||||
GPIO.setup(pins, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
|
||||
@ -3,6 +3,7 @@ Description=kiln-controller
|
||||
|
||||
[Service]
|
||||
ExecStart=/home/pi/kiln-controller/venv/bin/python /home/pi/kiln-controller/kiln-controller.py
|
||||
ExecStopPost=/home/pi/kiln-controller/venv/bin/python /home/pi/kiln-controller/gpio_off.py
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Loading…
Reference in New Issue
Block a user