summaryrefslogtreecommitdiffstats
path: root/polyp/esdcompat.sh.in
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-09-01 17:36:46 +0000
committerLennart Poettering <lennart@poettering.net>2004-09-01 17:36:46 +0000
commitee91cb6c9ded44d7f3ddb23b681df49fe5c8146b (patch)
tree4b71972098b932eb948891c2b05b71e42c24f70d /polyp/esdcompat.sh.in
parentdfd440bd5db50d3da6146a7f559e3a4f873f8810 (diff)
add esd compatible startup script
add default configuration script git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@172 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/esdcompat.sh.in')
-rwxr-xr-xpolyp/esdcompat.sh.in83
1 files changed, 83 insertions, 0 deletions
diff --git a/polyp/esdcompat.sh.in b/polyp/esdcompat.sh.in
new file mode 100755
index 00000000..1033930e
--- /dev/null
+++ b/polyp/esdcompat.sh.in
@@ -0,0 +1,83 @@
+#!/bin/sh
+
+# $Id$
+#
+# This file is part of polypaudio.
+#
+# polypaudio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# polypaudio is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with polypaudio; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+VERSION_STRING="@PACKAGE_NAME@ esd wrapper @PACKAGE_VERSION@"
+
+fail() {
+ echo "$1" > /dev/stderr
+ exit 1
+}
+
+for N in $(seq $#) ; do
+
+ case "$1" in
+
+ -v|--version)
+ echo "$VERSION_STRING"
+ exit 0
+ ;;
+
+ -h|--help)
+ cat <<EOF
+$VERSION_STRING
+
+Usage: $0 [options]
+
+ -v --version print version information
+ -h --help show this help
+
+Ignored directives:
+
+ -tcp use tcp/ip sockets in addition to unix domain
+ -promiscuous don't require authentication
+ -d DEVICE force esd to use sound device DEVICE
+ -b run server in 8 bit sound mode
+ -r RATE run server at sample rate of RATE
+ -as SECS free audio device after SECS of inactivity
+ -unix use unix domain sockets instead of tcp/ip
+ -public make tcp/ip access public (other than localhost)
+ -terminate terminate esd daemone after last client exits
+ -nobeeps disable startup beeps
+ -trust start esd even if use of /tmp/.esd can be insecure
+ -port PORT listen for connections at PORT (only for tcp/ip)
+ -bind ADDRESS binds to ADDRESS (only for tcp/ip)
+EOF
+ exit 0
+ ;;
+
+ -unix|-b|-public|-terminate|-nobeeps|-trust|-tcp|-promiscuous)
+ # Ignore these commands
+ ;;
+
+ -d|-r|-as|-port|-bind)
+ # Ignore these commands and their arguments
+ shift
+ ;;
+
+ *)
+ fail "Unknown command: $1"
+ ;;
+ esac
+
+ shift
+done
+
+exec "@ESDCOMPAT_BINARY@" -r