PKGBUILDs/extra/pipewire/pipewire-media-session.install

26 lines
893 B
Text
Raw Normal View History

2021-03-04 19:31:08 +00:00
post_install() {
# Enable service by default
# WantedBy=pipewire.service, which is itself socket-activated
systemctl --global enable pipewire-media-session.service
}
post_upgrade() {
2021-09-30 18:52:35 +00:00
if (( $(vercmp "$2" '0.3.23-1') < 0)); then
2021-03-04 19:31:08 +00:00
systemctl --global enable pipewire-media-session.service
fi
2021-09-30 18:52:35 +00:00
if (( $(vercmp "$2" '1:0.3.38-1') < 0)); then
printf "\tReenable any per-user enabled pipewire-media-session.service\n \
\tmanually to establish a new service alias for\n \
\tpipewire-session-manager.service added with 0.3.38.\n"
# reenable already enabled global pipewire-media-session.service, as an alias is introduced with 0.3.38
if systemctl --global is-enabled -q pipewire-media-session.service; then
systemctl --global reenable pipewire-media-session.service
fi
fi
2021-03-04 19:31:08 +00:00
}
pre_remove() {
systemctl --global disable pipewire-media-session.service
}