Script at shutdown not working
Posted: Sun Jun 28, 2020 4:38 pm
I am trying to setup a script when shooting down (only) my Pi 4 B.
This is the tvoff.sh script I put in /home/pi/
and this is the turn-tv-off-at-shutdown.service file
It simply doesn't turn off the TV at shutdown so what is wrong here?
This is the tvoff.sh script I put in /home/pi/
Code: Select all
echo standby 0 | cec-client -s -d 1
and this is the turn-tv-off-at-shutdown.service file
Code: Select all
[Unit]
Description=TUrn off the TV at shutdown only
DefaultDependencies=no
Conflicts=reboot.target
Before=poweroff.target halt.target shutdown.target
Requires=poweroff.target
[Service]
Type=oneshot
ExecStart=/home/pi/tvoff.sh start
RemainAfterExit=yes
[Install]
WantedBy=shutdown.target
It simply doesn't turn off the TV at shutdown so what is wrong here?