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
1 changed files with 6 additions and 0 deletions

View File

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