diff options
| author | Waldemar Brodkorb <wbx@openadk.org> | 2014-01-20 07:56:18 +0100 |
|---|---|---|
| committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-01-20 07:56:18 +0100 |
| commit | e979b689a571ccc86b5c0b3ad31933c30266f16b (patch) | |
| tree | c1c47e58c66dba680353bac013a1393236b18129 /package/pulseaudio/files | |
| parent | 71a0b54315cde7c65d1199b4576275bc9018660a (diff) | |
| parent | 2dc4f5f4de79fa8eb39d3af65fff4dacfb00d319 (diff) | |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/pulseaudio/files')
| -rw-r--r-- | package/pulseaudio/files/pulseaudio.init | 32 | ||||
| -rw-r--r-- | package/pulseaudio/files/pulseaudio.postinst | 7 |
2 files changed, 39 insertions, 0 deletions
diff --git a/package/pulseaudio/files/pulseaudio.init b/package/pulseaudio/files/pulseaudio.init new file mode 100644 index 000000000..029174628 --- /dev/null +++ b/package/pulseaudio/files/pulseaudio.init @@ -0,0 +1,32 @@ +#!/bin/sh +#PKG pulseaudio +#INIT 60 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${pulseaudio:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + if [ ! -d /var/run/pulse ]; then + mkdir -p /var/run/pulse && chown pulse.pulse /var/run/pulse && chmod 750 /var/run/pulse + fi + if [ ! -d /var/lib/pulse ]; then + mkdir -p /var/lib/pulse && chown pulse.pulse /var/lib/pulse && chmod 750 /var/lib/pulse + fi + /usr/bin/pulseaudio $pulseaudio_flags + ;; +stop) + kill $(pgrep -f /usr/bin/pulseaudio) + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "usage: $0 {start | stop | restart}" + exit 1 +esac +exit $? diff --git a/package/pulseaudio/files/pulseaudio.postinst b/package/pulseaudio/files/pulseaudio.postinst new file mode 100644 index 000000000..3e5b348a9 --- /dev/null +++ b/package/pulseaudio/files/pulseaudio.postinst @@ -0,0 +1,7 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf pulseaudio pulseaudio NO +gid=$(get_next_gid) +add_user pulse $(get_next_uid) $gid /var/run/pulse +add_group pulse $gid +add_rcconf pulseaudio_flags pulseaudio_flags "--system --disallow-exit --disallow-module-loading --disable-shm --exit-idle-time=-1 --realtime=false" |
