summaryrefslogtreecommitdiff
path: root/media-sound/pulseaudio/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-sound/pulseaudio/files
reinit the tree, so we can have metadata
Diffstat (limited to 'media-sound/pulseaudio/files')
-rw-r--r--media-sound/pulseaudio/files/pulseaudio.conf.d6
-rw-r--r--media-sound/pulseaudio/files/pulseaudio.init.d-580
-rw-r--r--media-sound/pulseaudio/files/pulseaudio.service10
-rw-r--r--media-sound/pulseaudio/files/pulseaudio.tmpfiles1
4 files changed, 97 insertions, 0 deletions
diff --git a/media-sound/pulseaudio/files/pulseaudio.conf.d b/media-sound/pulseaudio/files/pulseaudio.conf.d
new file mode 100644
index 000000000000..9e7245344a57
--- /dev/null
+++ b/media-sound/pulseaudio/files/pulseaudio.conf.d
@@ -0,0 +1,6 @@
+# Config file for /etc/init.d/pulseaudio
+
+# For more see "pulseaudio -h".
+
+# Startup options
+PA_OPTS="--log-target=syslog --disallow-module-loading=1"
diff --git a/media-sound/pulseaudio/files/pulseaudio.init.d-5 b/media-sound/pulseaudio/files/pulseaudio.init.d-5
new file mode 100644
index 000000000000..d5415d6987d8
--- /dev/null
+++ b/media-sound/pulseaudio/files/pulseaudio.init.d-5
@@ -0,0 +1,80 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+ use net
+
+ local script="/etc/pulse/system.pa"
+
+ for opt in ${PA_OPTS}; do
+ case "$opt" in
+ --file=*) script="${opt#*=}" ;;
+ -F*) script="${opt#-F}" ;;
+ esac
+ done
+
+ config "$script"
+
+ local needs="$(get_options need)"
+ if [ -n "${needs}" ]; then
+ need ${needs}
+ return
+ fi
+
+ if egrep -q '^[[:space:]]*load-module[[:space:]]+module-console-kit' "$script"; then
+ needs="${needs} consolekit"
+ fi
+
+#ifdef UDEV
+ if egrep -q '^[[:space:]]*load-module[[:space:]]+module-udev-detect' "$script"; then
+ needs="${needs} udev"
+ fi
+#endif
+
+#ifdef AVAHI
+ if egrep -q '^[[:space:]]*load-module[[:space:]]+module-zeroconf-publish' "$script"; then
+ needs="${needs} avahi-daemon"
+ fi
+#endif
+
+#ifdef BLUETOOTH
+ if egrep -q '^[[:space:]]*load-module[[:space:]]+module-bt-proximity' "$script"; then
+ needs="${needs} bluetooth"
+ fi
+#endif
+
+#ifdef ALSA
+ if egrep -q '^[[:space:]]*load-module[[:space:]]+module-alsa-(sink|source)' "$script" ||
+ egrep -q '^[[:space:]]*load-module[[:space:]]+module-(udev-)?detect' "$script" ||
+ egrep -q '^[[:space:]]*add-autoload-source[[:space:]]+(input|output)[[:space:]]+module-alsa-(sink|source)' "$script"; then
+ needs="${needs} alsasound"
+ fi
+#endif
+
+ need "${needs}"
+ save_options need "${needs}"
+}
+
+start() {
+ if [ -z "${PULSEAUDIO_SHOULD_NOT_GO_SYSTEMWIDE}" ]; then
+ eerror "Please don't use system wide PulseAudio unless you read the"
+ eerror "documentation available at http://www.pulseaudio.org/wiki/WhatIsWrongWithSystemMode"
+ eerror ""
+ eerror "When you're done, please set the variable PULSEAUDIO_SHOULD_NOT_GO_SYSTEMWIDE in"
+ eerror "/etc/conf.d/pulseaudio . Please remember that upstream does not support this mode"
+ eerror "when used for standard desktop configurations."
+ return 1
+ fi
+ ebegin "Starting pulseaudio"
+ PA_ALL_OPTS="${PA_OPTS} --fail=1 --daemonize=1 --system"
+ start-stop-daemon --start --exec /usr/bin/pulseaudio -- ${PA_ALL_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping pulseaudio"
+ start-stop-daemon --stop --quiet --exec /usr/bin/pulseaudio --pidfile /var/run/pulse/pid
+ eend $?
+}
diff --git a/media-sound/pulseaudio/files/pulseaudio.service b/media-sound/pulseaudio/files/pulseaudio.service
new file mode 100644
index 000000000000..c5f0d5799929
--- /dev/null
+++ b/media-sound/pulseaudio/files/pulseaudio.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=System wide PulseAudio instance
+After=syslog.target network.target alsasound.service
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/pulseaudio --system --log-target=syslog
+
+[Install]
+WantedBy=multi-user.target
diff --git a/media-sound/pulseaudio/files/pulseaudio.tmpfiles b/media-sound/pulseaudio/files/pulseaudio.tmpfiles
new file mode 100644
index 000000000000..88374e35574b
--- /dev/null
+++ b/media-sound/pulseaudio/files/pulseaudio.tmpfiles
@@ -0,0 +1 @@
+d /var/run/pulse 0755 pulse audio -