Created
May 11, 2024 16:44
-
-
Save carlitoselmago/9af5e0bb4ede82e59574121fd974ec41 to your computer and use it in GitHub Desktop.
MPV play on boot service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Play video at startup | |
After=multi-user.target | |
[Service] | |
Environment="DISPLAY=:0" | |
ExecStart=/bin/bash -c '/home/orangepi/playvideo.sh' | |
User=orangepi | |
Restart=on-abort | |
RemainAfterExit=yes | |
Type=simple | |
[Install] | |
WantedBy=multi-user.target | |
###################################################################### | |
And then the playvideo.sh: | |
#!/bin/bash | |
TRAP '' HUP | |
cd /home/orangepi | |
/usr/bin/mpv --vo=drm --loop video.mp4 | |
echo >> /tmp/playvideo.log | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment