remove mpd in restart music script

This commit is contained in:
shibao 2022-03-22 21:07:48 -04:00
parent c367c670e4
commit f895f2b2f3

View File

@ -1,28 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
CANTATA_RUNNING=0 echo stopping pipewire-media-session...
systemctl --user stop pipewire-media-session
if pgrep -f cantata &>/dev/null 2>&1; then
echo killing cantata...
CANTATA_RUNNING=1
pkill -f cantata
fi
# echo stopping pipewire-media-session...
# systemctl --user stop pipewire-media-session
echo stopping pipewire... echo stopping pipewire...
systemctl --user stop pipewire systemctl --user stop pipewire
echo stopping mpDris2... echo starting pipewire...
systemctl --user stop mpd-mpris systemctl --user start pipewire
echo stopping mpd... echo starting pipewire-media-session...
systemctl --user stop mpd systemctl --user start pipewire-media-session
echo starting mpd...
systemctl --user start mpd
echo starting mpDris2...
systemctl --user start mpd-mpris
if [[ $CANTATA_RUNNING == 1 ]]; then
echo starting cantata...
cantata& &>/dev/null
fi