05-03-2023, 11:03 AM
Hi
The mpd_oled package for Moode installs a systemd service that should start mpd_oled after the Moode startup has completed. This is done with the following (example) service file
and the helper script mpd_oled_launch_test:
With Moode 8.3.2, when mpd_oled is installed the Moode startup never completes, and wrkready is never set to 1, and mpd_oled_launch_test never makes it past the check for this. Eventually the mpd_oled service times out and wrkready is still set to 0.
moodeutil -l says
Maybe this relates to the following recent Moode commit
https://github.com/moode-player/moode/co...a9119e7efc
Is there a way to work around this? How I can test the Moode startup has completed from a systemd service file?
Adrian.
The mpd_oled package for Moode installs a systemd service that should start mpd_oled after the Moode startup has completed. This is done with the following (example) service file
Code:
[Unit]
Description=MPD OLED Display
[Service]
ExecStartPre=/usr/bin/mpd_oled_launch_test
ExecStart=/usr/bin/mpd_oled -o 6 -b 10 -g 1 -f 30 -c alsa,plughw:Loopback,1
TimeoutSec=3min
[Install]
WantedBy=multi-user.target
and the helper script mpd_oled_launch_test:
Code:
#!/bin/bash
sysname="unknown"
moodeutl_path="/usr/local/bin/moodeutl"
volumio_path="/volumio"
raudio_path="/srv/http/command/rune_shutdown"
if test -f "$moodeutl_path" ; then
sysname="moode"
# wait for worker to start to ensure start flag is set to 0
until ps -C worker.php > /dev/null; do
sleep 2
done
sleep 1 # extra time allow to set flag
until test $(moodeutl -q "select value from cfg_system where param='wrkready'") = "1"; do
sleep 4
done
elif test -f "$volumio_path" ; then
sysname="volumio"
until ps -C mpd > /dev/null; do
sleep 10
done
elif test -f "$raudio_path" ; then
sysname="raudio"
until ps -C mpd > /dev/null; do
sleep 10
done
fi
With Moode 8.3.2, when mpd_oled is installed the Moode startup never completes, and wrkready is never set to 1, and mpd_oled_launch_test never makes it past the check for this. Eventually the mpd_oled service times out and wrkready is still set to 0.
moodeutil -l says
Code:
pi@moode832:~ $ moodeutl -l
20230503 120814 worker: --
20230503 120814 worker: -- Start moOde 8 series
20230503 120814 worker: --
20230503 120814 worker: Successfully daemonized
20230503 120814 worker: Waiting for Linux startup...
20230503 121133 worker: ERROR: Linux startup failed to complete after waiting 180 seconds
Maybe this relates to the following recent Moode commit
https://github.com/moode-player/moode/co...a9119e7efc
Is there a way to work around this? How I can test the Moode startup has completed from a systemd service file?
Adrian.