[pulseaudio] add init script
authorJan Willies <loswillios@gmail.com>
Thu, 3 Mar 2011 00:41:26 +0000 (00:41 +0000)
committerJan Willies <loswillios@gmail.com>
Thu, 3 Mar 2011 00:41:26 +0000 (00:41 +0000)
SVN-Revision: 25840

sound/pulseaudio/Makefile
sound/pulseaudio/files/pulseaudio.init [new file with mode: 0644]

index 789db2f..c834faa 100644 (file)
@@ -88,12 +88,17 @@ define Package/pulseaudio/install
                $(1)/usr/bin \
                $(1)/usr/lib \
                $(1)/usr/lib/pulse-$(PKG_VERSION)/modules \
-               $(1)/etc/pulse
+               $(1)/etc/pulse \
+               $(1)/etc/init.d
 
        $(INSTALL_BIN) \
                $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \
                $(1)/usr/bin/pulseaudio
 
+       $(INSTALL_BIN) \
+               ./files/pulseaudio.init 
+               $(1)/etc/init.d/pulseaudio
+
        $(INSTALL_CONF) \
                $(PKG_INSTALL_DIR)/etc/pulse/* \
                $(1)/etc/pulse
diff --git a/sound/pulseaudio/files/pulseaudio.init b/sound/pulseaudio/files/pulseaudio.init
new file mode 100644 (file)
index 0000000..0c1a7c2
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2011 OpenWrt.org
+START=65
+
+start() {
+       mkdir -p /tmp/lib/pulse
+       /usr/bin/pulseaudio –daemonize –system –disallow-exit –disallow-module-loading –disable-shm –exit-idle-time=-1
+}
+
+stop() {
+       killall pulseaudio
+}