summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Redaelli <drizzt@gentoo.org>2007-03-10 11:13:07 +0000
committerTimothy Redaelli <drizzt@gentoo.org>2007-03-10 11:13:07 +0000
commit078fcf53f8a99c4d5239f0240bbd1f392895c9f6 (patch)
tree8b02c43225bd486bedb836d9d87c0440f8c901f9 /net-misc
parentAdd ~amd64 keyword (diff)
downloaddrizzt-078fcf53f8a99c4d5239f0240bbd1f392895c9f6.tar.gz
drizzt-078fcf53f8a99c4d5239f0240bbd1f392895c9f6.tar.bz2
drizzt-078fcf53f8a99c4d5239f0240bbd1f392895c9f6.zip
Spring Clean
svn path=/; revision=112
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/asterisk/Manifest4
-rw-r--r--net-misc/asterisk/asterisk-1.4.0_beta3.ebuild72
-rw-r--r--net-misc/asterisk/files/asterisk.confd98
-rwxr-xr-xnet-misc/asterisk/files/asterisk.rc6235
4 files changed, 0 insertions, 409 deletions
diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest
deleted file mode 100644
index 99103d6..0000000
--- a/net-misc/asterisk/Manifest
+++ /dev/null
@@ -1,4 +0,0 @@
-AUX asterisk.confd 2200 RMD160 f26ac9b18e8c1db86c54839d9b4a816cfe45c61f SHA1 2baee139893fd9c413d140db843831da1917f05f SHA256 b94a59f36a46362622acd2ccc811e1e9dd0abf928104285c7098d7c17a324379
-AUX asterisk.rc6 5569 RMD160 206738a08fbc74a43a72fbaa0138299c1d6766e8 SHA1 430d9c19920c12f59f2558eb947a6add056fd1b4 SHA256 471c3f8b3d1f4b7d3281b71f75c7857d595a676380abbc96fb86d47b1252bc82
-DIST asterisk-1.4.0-beta3.tar.gz 10928902 RMD160 922b10118dbe1d27e0f48d6e8cfd7d8a64cc62f7 SHA1 9161729cd7a6dd86b25c6a0c8aeb47bd66009153 SHA256 4fe019ee7261748dbfbd68df86e839e2436792d4c6f3e3f7d14666abb363823b
-EBUILD asterisk-1.4.0_beta3.ebuild 1755 RMD160 b23486ab44c00f4aa7e6c521e97816c51c19feaf SHA1 ea8b8064627374a98c9d02adfe53c7dcfe40c5ac SHA256 19164ca6f75ec5e84167c5621b548f6a65bbbe0bb7e5f35114f2a4e4b61b7774
diff --git a/net-misc/asterisk/asterisk-1.4.0_beta3.ebuild b/net-misc/asterisk/asterisk-1.4.0_beta3.ebuild
deleted file mode 100644
index 4c5ba51..0000000
--- a/net-misc/asterisk/asterisk-1.4.0_beta3.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-inherit eutils versionator
-
-MY_P=${PN}-$(replace_version_separator 3 "-")
-
-DESCRIPTION="Asterisk: A Modular Open Source PBX System"
-HOMEPAGE="http://www.asterisk.org/"
-SRC_URI="http://ftp.digium.com/pub/asterisk/releases/${MY_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~x86 ~amd64"
-IUSE=""
-
-DEPEND="sys-devel/flex
- sys-devel/bison"
-RDEPEND="${DEPEND}"
-
-S="${WORKDIR}/${MY_P}"
-
-src_compile() {
- econf --localstatedir=/var --datarootdir=/var/share || die
- emake || die
-}
-
-src_install() {
- emake DESTDIR="${D}" -j1 install || die
- emake DESTDIR="${D}" -j1 samples || die
- emake DESTDIR="${D}" -j1 datafiles || die
-
- mv "${D}"/{smsq,stereorize,streamplayer,aelparse,muted} "${D}"/usr/bin
-
- newinitd "${FILESDIR}"/asterisk.rc6 asterisk
- newconfd "${FILESDIR}"/asterisk.confd asterisk
-}
-
-pkg_preinst() {
- enewgroup asterisk
- enewuser asterisk -1 -1 /var/lib/asterisk asterisk
-}
-
-pkg_postinst() {
- einfo "Fixing permissions"
-
- chown -R asterisk:asterisk "${ROOT}"var/{spool,lib,log}/asterisk
- chmod -R u=rwX,g=rX,o= "${ROOT}"var/{spool,lib,log}/asterisk
-
- chown -R root:asterisk "${ROOT}"etc/asterisk
- chmod -R u=rwX,g=rX,o= "${ROOT}"etc/asterisk
- echo
-
- #
- # Announcements, warnings, reminders...
- #
- einfo "Asterisk has been installed"
- einfo ""
- einfo "If you want to know more about asterisk, visit these sites:"
- einfo "http://www.asteriskdocs.org/"
- einfo "http://www.voip-info.org/wiki-Asterisk"
- echo
- einfo "http://asterisk.xvoip.com/"
- einfo "http://junghanns.net/asterisk/"
- einfo "http://www.automated.it/guidetoasterisk.htm"
- echo
- einfo "Gentoo VoIP IRC Channel:"
- einfo "#gentoo-voip @ irc.freenode.net"
- echo
- echo
-}
diff --git a/net-misc/asterisk/files/asterisk.confd b/net-misc/asterisk/files/asterisk.confd
deleted file mode 100644
index c25ee00..0000000
--- a/net-misc/asterisk/files/asterisk.confd
+++ /dev/null
@@ -1,98 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.2.0/asterisk.confd,v 1.1 2006/04/16 01:04:44 stkn Exp $
-
-#
-# Additional options for asterisk
-#
-# see "asterisk -h" for a list of options
-#
-ASTERISK_OPTS=""
-
-#
-# User and group to run asterisk as
-#
-# Value: double-colon separated list of user and group, or empty to run as root:
-#
-#
-# "asterisk:asterisk" to run as user "asterisk" and group "asterisk"
-#
-# "asterisk" to run as user "asterisk" and all groups that user "asterisk" is a member of
-#
-# ":asterisk" to run as user "root" and group "asterisk"
-#
-# "" to run as user "root" and group "root"
-#
-ASTERISK_USER="asterisk"
-
-#
-# Nicelevel
-#
-# Set the priority of the asterisk process
-#
-# Value: (highest) -20..19 (lowest)
-#
-#ASTERISK_NICE="19"
-
-#
-# Wrapper script
-#
-# Value: yes or no/empty
-#
-ASTERISK_WRAPPER="no"
-
-############# Wrapper script settings #############
-
-#
-# Send crash notifications emails to this address
-# (needs a working mail service and /usr/sbin/sendmail to do so (e.g. ssmtp))
-#
-# Value: Email address or empty to disable
-#
-#ASTERISK_NOTIFY_EMAIL="root"
-
-#
-# Send asterisk's output to this terminal
-#
-# Value: Full path to device node or a number
-#
-#ASTERISK_TTY="/dev/tty9"
-
-#
-# Start an asterisk console on the terminal specified by ASTERISK_TTY
-#
-# Warning! Use only for debugging, this is a potential security issue!
-#
-# Value: yes or no/empty
-#
-ASTERISK_CONSOLE="no"
-
-#
-# Maximum size of core files.
-#
-# Value: Size in bytes, unlimited for no limit or empty to disable.
-#
-#ASTERISK_CORE_SIZE="unlimited"
-
-#
-# ASTERISK_CORE_DIR
-#
-# Value: Directory (will be created if non-existant), default is /tmp
-#
-ASTERISK_CORE_DIR="/var/lib/asterisk/coredump"
-
-#
-# Max number of filedescriptors
-#
-# Value: Number of descriptors
-#
-#ASTERISK_MAX_FD="1024"
-
-#
-# Kill these tasks after asterisk crashed (ASTERISK_WRAPPER=yes only!)
-#
-# Warning! This will kill _ALL_ tasks with the specified names!
-#
-# Value: Space separated list of names in double quotes (e.g. "mpg123 mad")
-#
-#ASTERISK_CLEANUP_ON_CRASH="mpg123 asterisk-mpg123 mad"
diff --git a/net-misc/asterisk/files/asterisk.rc6 b/net-misc/asterisk/files/asterisk.rc6
deleted file mode 100755
index f2f0471..0000000
--- a/net-misc/asterisk/files/asterisk.rc6
+++ /dev/null
@@ -1,235 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/files/1.2.0/asterisk.rc6,v 1.1 2006/04/16 01:04:44 stkn Exp $
-
-opts="${opts} forcestop reload"
-
-depend() {
- need net
- use zaptel mysql postgresql slapd capi
-}
-
-is_running() {
- if [[ -z "$(pidof asterisk)" ]]; then
- return 1
- else
- PID="$(cat /var/run/asterisk/asterisk.pid)"
- for x in $(pidof asterisk); do
- if [[ "${x}" = "${PID}" ]]; then
- return 0
- fi
- done
- fi
-
- return 1
-}
-
-asterisk_run_loop() {
- local OPTS ARGS MSG NICE=""
- local result=0 signal=0
-
- # default options
- OPTS="-f" # don't fork / detach breaks wrapper script...
-
- # filter (redundant) arguments
- ARGS="$(echo "${@}" | sed -e "s:-c\|-f::g")"
-
- # mangle yes/no options
- ASTERISK_CONSOLE="$(echo ${ASTERISK_CONSOLE} | tr [:lower:] [:upper:])"
-
- if [[ -n "${ASTERISK_CORE_SIZE}" ]] &&
- [[ "${ASTERISK_CORE_SIZE}" != "0" ]]; then
- ulimit -c ${ASTERISK_CORE_SIZE}
-
- if [[ -n "${ASTERISK_CORE_DIR}" ]] && \
- [[ ! -d "${ASTERISK_CORE_DIR}" ]]
- then
- mkdir -m750 -p "${ASTERISK_CORE_DIR}"
-
- if [[ -n "${ASTERISK_USER}" ]]; then
- chown -R "${ASTERISK_USER}" "${ASTERISK_CORE_DIR}"
- fi
- fi
- ASTERISK_CORE_DIR="${ASTERISK_CORE_DIR:-/tmp}"
-
- cd "${ASTERISK_CORE_DIR}"
- echo " Core dump size : ${ASTERISK_CORE_SIZE}"
- echo " Core dump location : ${ASTERISK_CORE_DIR}"
- fi
-
- if [[ -n "${ASTERISK_MAX_FD}" ]]; then
- ulimit -n ${ASTERISK_MAX_FD}
- echo " Max open filedescriptors : ${ASTERISK_MAX_FD}"
- fi
-
- if [[ -n "${ASTERISK_NICE}" ]]; then
- echo " Nice level : ${ASTERISK_NICE}"
- NICE="/bin/nice -n ${ASTERISK_NICE} --"
- fi
-
- if [[ -n "${ASTERISK_NOTIFY_EMAIL}" ]]; then
- if [[ -x /usr/sbin/sendmail ]]; then
- echo " Email notifications go to : ${ASTERISK_NOTIFY_EMAIL}"
- else
- echo " Notifications disabled, /usr/sbin/sendmail doesn't exist or is not executable!"
- unset ASTERISK_NOTIFY_EMAIL
- fi
- fi
-
- if [[ -n "${ASTERISK_TTY}" ]]; then
- for x in ${ASTERISK_TTY} \
- /dev/tty${ASTERISK_TTY} \
- /dev/vc/${ASTERISK_TTY}
- do
- if [[ -c "${x}" ]]; then
- TTY="${x}"
- fi
- done
- [[ -n "${TTY}" ]] && \
- echo " Messages are sent to : ${TTY}"
- fi
-
- if [[ "${ASTERISK_CONSOLE}" = "YES" ]] && [[ -n "${TTY}" ]]; then
- echo " Starting Asterisk console : ${ASTERISK_CONSOLE}"
- OPTS="${OPTS} -c"
- fi
-
- OPTS="${OPTS} ${ARGS}"
-
- while :; do
-
- if [[ -n "${TTY}" ]]; then
- /usr/bin/stty -F ${TTY} sane
- ${NICE} /usr/sbin/asterisk ${OPTS} >${TTY} 2>&1 <${TTY}
- result=$?
- else
- ${NICE} /usr/sbin/asterisk ${OPTS} &>/dev/null
- result=$?
- fi
-
- if [[ $result -eq 0 ]]; then
- echo "Asterisk terminated normally"
- break
- else
- if [[ $result -gt 128 ]]; then
- signal=$((result - 128))
- MSG="Asterisk terminated with Signal: $signal"
-
- CORE_TARGET="core-$(date "+%Y%m%d-%h%M%s")"
-
- local CORE_DUMPED=0
- if [[ -f "${ASTERISK_CORE_DIR}/core" ]]; then
- mv "${ASTERISK_CORE_DIR}/core" \
- "${ASTERISK_CORE_DIR}/${CORE_TARGET}"
- CORE_DUMPED=1
-
- elif [[ -f "${ASTERISK_CORE_DIR}/core.${PID}" ]]; then
- mv "${ASTERISK_CORE_DIR}/core.${PID}" \
- "${ASTERISK_CORE_DIR}/${CORE_TARGET}"
- CORE_DUMPED=1
-
- fi
-
- [[ $CORE_DUMPED -eq 1 ]] && \
- MSG="${MSG}\n\rCore dumped: ${ASTERISK_CORE_DIR}/${CORE_TARGET}"
- else
- MSG="Asterisk terminated with return code: $result"
- fi
-
- # kill left-over tasks
- for X in ${ASTERISK_CLEANUP_ON_CRASH}; do
- kill -9 $(pidof ${X});
- done
- fi
-
- [[ -n "${TTY}" ]] \
- && echo "${MSG}" >${TTY} \
- || echo "${MSG}"
-
-
- if [[ -n "${ASTERISK_NOTIFY_EMAIL}" ]] && \
- [[ -x /usr/sbin/sendmail ]]; then
- echo -e -n "Subject: Asterisk crashed\n\r${MSG}\n\r" |\
- /usr/sbin/sendmail "${ASTERISK_NOTIFY_EMAIL}"
- fi
- sleep 5
- echo "Restarting Asterisk..."
- done
- return 0
-}
-
-start() {
- local OPTS USER GROUP PID
- local tmp x
-
- if [[ -n "${ASTERISK_NICE}" ]]; then
- if [[ ${ASTERISK_NICE} -ge -20 ]] && \
- [[ ${ASTERISK_NICE} -le 19 ]]; then
- OPTS="--nicelevel ${ASTERISK_NICE}"
- else
- eerror "Nice value must be between -20 and 19"
- return 1
- fi
- fi
-
- if [[ -n "${ASTERISK_USER}" ]]; then
- USER=${ASTERISK_USER/:*/}
- GROUP=$(echo $ASTERISK_USER | awk -F: '/.*:.*/ { print $2 }')
- if [[ -n "${USER}" ]]; then
- ASTERISK_OPTS="${ASTERISK_OPTS} -U ${USER}"
- fi
- if [[ -n "${GROUP}" ]]; then
- ASTERISK_OPTS="${ASTERISK_OPTS} -G ${GROUP}"
- GROUP=":${GROUP}" # make it look nice...
- fi
- ebegin "Starting asterisk PBX (as ${USER}${GROUP})"
- else
- ebegin "Starting asterisk PBX (as root)"
- fi
-
- if [[ "$(echo ${ASTERISK_WRAPPER} | tr [:upper:] [:lower:])" != "yes" ]]; then
- start-stop-daemon --start --exec /usr/sbin/asterisk \
- ${OPTS} -- ${ASTERISK_OPTS}
- else
- asterisk_run_loop ${ASTERISK_OPTS} 2>/dev/null &
- fi
-
- if [[ $result -eq 0 ]]; then
- # 2 seconds should be enough for asterisk to start
- sleep 2
-
- result=$(is_running)
- fi
-
- eend $result
-}
-
-forcestop() {
- ebegin "Stopping asterisk PBX"
- start-stop-daemon --stop --pidfile /var/run/asterisk/asterisk.pid
- eend $?
-}
-
-stop() {
-
- if is_running; then
- ebegin "Stopping asterisk PBX gracefully"
- /usr/sbin/asterisk -r -x "stop gracefully" &>/dev/null
- [[ $? -eq 0 ]] && svc_stop
- eend
- else
-
- eerror "Asterisk is not running!"
- fi
-}
-
-reload() {
- if is_running; then
- ebegin "Forcing asterisk to reload configuration"
- /usr/sbin/asterisk -r -x "reload" &>/dev/null
- eend $?
- else
- eerror "Asterisk is not running!"
- fi
-}