diff options
author | Stijn Buys <ingar@telenet.be> | 2022-02-27 23:42:04 +0100 |
---|---|---|
committer | Stijn Buys <ingar@telenet.be> | 2022-02-27 23:42:04 +0100 |
commit | e6ef9ed4a3129da1e449f4f4f5e0d7719b8b04c5 (patch) | |
tree | 2ed4fe3d524ceeb32b93d3405741a989831a5007 | |
parent | d368910ee1403ead0ffaa97d0b67a5ae84cd148c (diff) |
Run systemctl daemon-reload at the end of make install.
-rw-r--r-- | buttonctl/Makefile | 2 | ||||
-rw-r--r-- | buttonctl/buttond.py | 4 | ||||
-rw-r--r-- | ledctl/Makefile | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/buttonctl/Makefile b/buttonctl/Makefile index fb8dc5f..7b8c933 100644 --- a/buttonctl/Makefile +++ b/buttonctl/Makefile @@ -1,4 +1,4 @@ install: install -m 744 buttond.py /usr/bin/buttond install -m 644 systemd/buttond.service /etc/systemd/system/buttond.service - systemd daemon-reload + systemctl daemon-reload diff --git a/buttonctl/buttond.py b/buttonctl/buttond.py index 26878f1..a49b4e4 100644 --- a/buttonctl/buttond.py +++ b/buttonctl/buttond.py @@ -4,11 +4,13 @@ import RPi.GPIO as GPIO import subprocess +print ('waiting for button presses'); + GPIO.setmode(GPIO.BCM) GPIO.setup(26, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.wait_for_edge(26, GPIO.FALLING) -print ('button pressed') +print ('button pressed, shutting down') subprocess.call(['ledctl', 'boot'], shell=False) diff --git a/ledctl/Makefile b/ledctl/Makefile index 2777bb8..090ef1d 100644 --- a/ledctl/Makefile +++ b/ledctl/Makefile @@ -3,3 +3,4 @@ install: ln -sf /usr/bin/ledctl /usr/lib/systemd/system-shutdown/ install -m 644 systemd/led-boot.service /etc/systemd/system/led-boot.service install -m 644 systemd/led-ready.service /etc/systemd/system/led-ready.service + systemctl daemon-reload |