]> code.delx.au - pulseaudio/blob - src/daemon/esdcompat.in
client-conf: Remove redundant function parameters
[pulseaudio] / src / daemon / esdcompat.in
1 #!/bin/sh
2
3 # This file is part of PulseAudio.
4 #
5 # PulseAudio is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # PulseAudio is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # General Public License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with PulseAudio; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18 # USA.
19
20 VERSION_STRING="@PACKAGE_NAME@ esd wrapper @PACKAGE_VERSION@"
21
22 fail() {
23 echo "ERROR: $1"
24 exit 1
25 }
26
27 ARGS=" --log-target=syslog"
28
29 while [ "$#" -gt "0" ]; do
30
31 case "$1" in
32 "")
33 ;;
34
35 -v|--version)
36 echo "$VERSION_STRING"
37 exit 0
38 ;;
39
40 -h|--help)
41 cat <<EOF
42 $VERSION_STRING
43
44 Usage: $0 [options]
45
46 -v --version print version information
47 -h --help show this help
48
49 Ignored directives:
50
51 -tcp use tcp/ip sockets in addition to unix domain
52 -promiscuous don't require authentication
53 -d DEVICE force esd to use sound device DEVICE
54 -b run server in 8 bit sound mode
55 -r RATE run server at sample rate of RATE
56 -as SECS free audio device after SECS of inactivity
57 -unix use unix domain sockets instead of tcp/ip
58 -public make tcp/ip access public (other than localhost)
59 -terminate terminate esd daemone after last client exits
60 -nobeeps disable startup beeps
61 -trust start esd even if use of /tmp/.esd can be insecure
62 -port PORT listen for connections at PORT (only for tcp/ip)
63 -bind ADDRESS binds to ADDRESS (only for tcp/ip)
64 EOF
65 exit 0
66 ;;
67
68 -spawnpid)
69 shift
70 ARGS="$ARGS '-Lmodule-esound-compat-spawnpid pid=$1'"
71 ;;
72
73 -spawnfd)
74 shift
75 ARGS="$ARGS '-Lmodule-esound-compat-spawnfd fd=$1'"
76 ;;
77
78 -unix|-b|-public|-terminate|-nobeeps|-trust|-tcp|-promiscuous)
79 # Ignore these commands
80 ;;
81
82 -d|-r|-as|-port|-bind)
83 # Ignore these commands and their arguments
84 shift
85
86 ;;
87
88 *)
89 fail "Unknown command: $1"
90 ;;
91 esac
92
93 shift
94 done
95
96 eval "exec '@PA_BINARY@'$ARGS"