#!/bin/sh -e
#
# This install script was generated by abuild for managing systemd units
#

SYSTEMD_BUS_TIMEOUT=15s

units_user="pipewire-pulse.socket pipewire-pulse.service "

# Disable globally (symlinks in /etc/systemd/user)
systemctl --global disable --no-warn $units_user

# If on a running system, we also enter each running session and ensure
# the service is disabled for each user (symlinks in ~/.config/systemd)
if [ -d "/run/systemd/system" ]; then
    users=$(systemctl list-units 'user@*' --legend=no | sed -n -r 's/.*user@([0-9]+).service.*/\1/p')
    for user in $users; do
        systemctl --user -M "$user@" disable --no-warn $units_user &
    done
    wait
fi
