diff options
author | Stefan Briesenick <sbriesen@gentoo.org> | 2008-10-14 23:53:39 +0000 |
---|---|---|
committer | Stefan Briesenick <sbriesen@gentoo.org> | 2008-10-14 23:53:39 +0000 |
commit | 57ffd4d214f586ff6b8630a0e37cd49ce9c3a3c3 (patch) | |
tree | 9ed2cb7dc9e975767d708e27d8ea5c3994f5645a /net-misc/iaxmodem/files | |
parent | Version bump and removed old (diff) | |
download | historical-57ffd4d214f586ff6b8630a0e37cd49ce9c3a3c3.tar.gz historical-57ffd4d214f586ff6b8630a0e37cd49ce9c3a3c3.tar.bz2 historical-57ffd4d214f586ff6b8630a0e37cd49ce9c3a3c3.zip |
initial commit, solving bug# 169151.
Package-Manager: portage-2.2_rc12/cvs/Linux 2.6.26-gentoo-r1 i686
Diffstat (limited to 'net-misc/iaxmodem/files')
-rw-r--r-- | net-misc/iaxmodem/files/iaxmodem.cfg | 88 | ||||
-rw-r--r-- | net-misc/iaxmodem/files/iaxmodem.confd | 6 | ||||
-rw-r--r-- | net-misc/iaxmodem/files/iaxmodem.initd | 43 | ||||
-rw-r--r-- | net-misc/iaxmodem/files/iaxmodem.logrotated | 9 |
4 files changed, 146 insertions, 0 deletions
diff --git a/net-misc/iaxmodem/files/iaxmodem.cfg b/net-misc/iaxmodem/files/iaxmodem.cfg new file mode 100644 index 000000000000..8a30e912e58b --- /dev/null +++ b/net-misc/iaxmodem/files/iaxmodem.cfg @@ -0,0 +1,88 @@ +; Sample Configuration for IAXmodem +; +; Comments can be placed into the IAXmodem configuration files by beginning +; them with a semicolon (";"). +; +; Copy this file to the /etc/iaxmodem directory with a unique file name. +; The name of the file will serve as the identifier, if you choose to +; launch iaxmodem in non-daemon mode. + + +; The "nodaemon" entry exempts the modem from inclusion with daemon use. +; Comment out this line, if you want to use this config in daemon mode! + +nodaemon + +; The "device" entry is the full name of the device that you will be using +; in your modem application. If running multiple instances of iaxmodem then +; you will need a different device for each instance. + +device /dev/ttyIAX + +; The "owner" entry (formatted "user:group") is the system user and group +; that IAXmodem should use for the created device. + +owner uucp:uucp + +; The "mode" entry is the permissions mode for the created device. + +mode 660 + +; The "port" entry refers to the preferred port number on which to listen +; for communications from the Asterisk server (so if you're using more than +; one IAXmodem on a single IP address you will need to have each IAXmodem +; configuration use a different port). You should not use "4569" if Asterisk +; is already listening on port 4569. + +port 4570 + +; The "refresh" entry indicates the preference on how frequently to refresh +; the registration with the Asterisk server. (However, the actual refresh +; value that is used will be negotiated between IAXmodem and the Asterisk +; server.) By setting this to a value of "0" (zero), IAXmodem will not +; register with the server, and thus the server should be configured to +; communicate with IAXmodem on a static address. + +refresh 300 + +; The "server", "peername", and "secret" entries refer to the server name +; (or address), the registered peer name for the IAXmodem client, and the +; registered secret (password) for the IAXmodem client. + +server 127.0.0.1 +peername iaxmodem +secret password + +; The entries "cidname" and "cidnumber" refer to the Caller*ID presentation +; that will be made by IAXmodem to the Asterisk server. + +cidname John Doe +cidnumber 8005551212 + +; The "codec" entry refers to the preferred audio codec. This can be +; "slinear", "alaw", or "ulaw". + +codec slinear +;codec alaw +;codec ulaw + +; The "record" entry causes audio files to be recorded. + +;record + +; The "replay" entry causes the audio files to be replayed back. + +;replay + +; The "nojitterbuffer" entry disables the very simple iaxmodem jitterbuffer + +;nojitterbuffer + +; The "iax2debug" entry enables debugging output for IAX2. + +;iax2debug + +; The "dspdebug" entry enables debugging output for the DSPs. + +;dspdebug + diff --git a/net-misc/iaxmodem/files/iaxmodem.confd b/net-misc/iaxmodem/files/iaxmodem.confd new file mode 100644 index 000000000000..5998d8a36e96 --- /dev/null +++ b/net-misc/iaxmodem/files/iaxmodem.confd @@ -0,0 +1,6 @@ +# Configfile for /etc/init.d/iaxmodem + +# Set the priority of the iaxmodem process +# Value: (highest) -20..19 (lowest) +# +#IAXMODEM_NICE="-5" diff --git a/net-misc/iaxmodem/files/iaxmodem.initd b/net-misc/iaxmodem/files/iaxmodem.initd new file mode 100644 index 000000000000..6d254205a0c4 --- /dev/null +++ b/net-misc/iaxmodem/files/iaxmodem.initd @@ -0,0 +1,43 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/iaxmodem/files/iaxmodem.initd,v 1.1 2008/10/14 23:53:39 sbriesen Exp $ + +description="IAXmodem" +description_reload="Reread configuration file and make the appropriate changes" +extra_started_commands="reload" +command="/usr/sbin/iaxmodem" +pidfile="/var/run/iaxmodem.pid" +name="iaxmodem" + +depend() { + use asterisk + need net +} + +start() { + ebegin "Starting ${description}" + start-stop-daemon --start --quiet --pidfile "${pidfile}" \ + --env TMPDIR="/tmp" --nice ${IAXMODEM_NICE:-0} --exec "${command}" + eend ${?} +} + +stop() { + local childs="" + ebegin "Stopping ${description}" + # start-stop-daemon doesn't kill childs reliable, so we + # use a combination of pgrep + start-stop-daemon + kill + [ -s "${pidfile}" ] && childs=$(pgrep -P $(cat "${pidfile}")) + start-stop-daemon --stop --quiet --pidfile "${pidfile}" --retry TERM/10/KILL/5 + if eend ${?}; then + # if there're still childs running, kill them! + [ -n "${childs}" ] && kill -KILL ${childs} 2>/dev/null + return 0 + fi +} + +reload() { + ebegin "Reloading ${description} configuration" + start-stop-daemon --stop --signal HUP --pidfile "${pidfile}" + eend ${?} +} diff --git a/net-misc/iaxmodem/files/iaxmodem.logrotated b/net-misc/iaxmodem/files/iaxmodem.logrotated new file mode 100644 index 000000000000..037aa94ef9dd --- /dev/null +++ b/net-misc/iaxmodem/files/iaxmodem.logrotated @@ -0,0 +1,9 @@ +/var/log/iaxmodem/* { + notifempty + missingok + size 1000k + sharedscripts + postrotate + /etc/init.d/iaxmodem --ifstarted --quiet reload + endscript +} |