Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


What program runs the Software update, Update library and the Thumbnail Generator?
#1
I'm working on a script and it's goal is to shut down the raspberry pi after one hour of moOde no longer playing songs, so far I've discovered:
Code:
mpc status %state%
To read if MPD is "playing", "stopped" or "paused", and this code runs fine. I've also read this thread https://moodeaudio.org/forum/showthread.php?tid=7513 to learn about MPD and the renderers. But I don't want the raspberry pi to shut down if a necesary update is running or if I'm updating the library, therefore my questions:
1- What program runs the Software update? Is it apt? I can detect if apt is running with something like

Code:
pidof -x apt

2- What program runs the Update library?
3- What program runs the Thumbnail Generator?
4- Am I missing any other "vital" program who would break my moOde functionality if interrupted by a shut down?

Thanks
bottlecaps
Reply
#2
Try these commands

Code:
# Returns 1 if MPD or renderer is playing
moodeutl --hwparams | grep -c "closed"

# Returns 1 if "Update or Regenerate Library" is running
mpc | grep -c "Updating DB"

# Returns 1 if Thumbnail generator is running
pgrep -c thumb-gen.php

# Returns 1 if System Updater is running
pgrep -c system-updater.sh
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Worked great, thank you so much Tim!

bottlecaps
Reply


Forum Jump: