TCUSER=`cat /etc/sysconfig/tcuser` export PATH="/bb:$PATH" udevadm trigger /bb/addgroup -S pulse /bb/addgroup -S pulse-access /bb/adduser -D -S -H -G pulse -g "PulseAudio daemon" -h /var/run/pulse pulse /bb/adduser pulse audio /bb/adduser pulse staff if [ -f /etc/init.d/dbus ]; then /etc/init.d/dbus start fi [ -d /home/"$TCUSER"/.X.d ] || mkdir -p /home/"$TCUSER"/.X.d if [ ! -f /home/"$TCUSER"/.X.d/pulseaudio ]; then echo "#!/bin/sh" >> /home/"$TCUSER"/.X.d/pulseaudio echo " " >> /home/"$TCUSER"/.X.d/pulseaudio [ -d /home/"$TCUSER"/.config/pulse ] && sudo rm -r /home/"$TCUSER"/.config/pulse sudo rm -r /tmp/pulse-* echo "start-pulseaudio-x11" >> /home/"$TCUSER"/.X.d/pulseaudio #echo "pulseaudio --log-level=debug --log-target=stderr --log-time=true >> /var/log/pulse.log 2>&1 " >> /home/"$TCUSER"/.X.d/pulseaudio echo " " >> /home/"$TCUSER"/.X.d/pulseaudio fi chown "$TCUSER":staff /home/"$TCUSER"/.X.d/pulseaudio chmod 775 /home/"$TCUSER"/.X.d/pulseaudio udevadm control --reload-rules udevadm trigger --subsystem-match=sound --action=change #pulseaudio --system #pulseaudio -k sed -i '/exit-idle-time/d' /etc/pulse/daemon.conf echo " " >> /etc/pulse/daemon.conf echo "exit-idle-time = -1" >> /etc/pulse/daemon.conf grep "^load-module module-console-kit" /etc/pulse/default.pa && \ sed -i '/load-module module-console-kit/s/^/#/' /etc/pulse/default.pa grep "^load-module module-systemd-login" /etc/pulse/default.pa && \ sed -i '/load-module module-systemd-login/s/^/#/' /etc/pulse/default.pa exit 0 #