Add function to determine whether PulseAudio is in use

This commit is contained in:
Simon Long 2020-10-12 11:28:43 +01:00
parent e589e7cde6
commit 78a0a8b916

View File

@ -83,6 +83,12 @@ is_fkms() {
fi fi
} }
is_pulseaudio() {
PS=$(ps ax)
echo "$PS" | grep -q pulseaudio
return $?
}
is_installed() { is_installed() {
if [ "$(dpkg -l "$1" 2> /dev/null | tail -n 1 | cut -d ' ' -f 1)" != "ii" ]; then if [ "$(dpkg -l "$1" 2> /dev/null | tail -n 1 | cut -d ' ' -f 1)" != "ii" ]; then
return 1 return 1