PKGBUILDs/extra/pipewire/pipewire-media-session.install
2021-09-30 18:52:35 +00:00

25 lines
893 B
Text

post_install() {
# Enable service by default
# WantedBy=pipewire.service, which is itself socket-activated
systemctl --global enable pipewire-media-session.service
}
post_upgrade() {
if (( $(vercmp "$2" '0.3.23-1') < 0)); then
systemctl --global enable pipewire-media-session.service
fi
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
}
pre_remove() {
systemctl --global disable pipewire-media-session.service
}