提交 86b0bde5 authored 作者: Michal Bielicki's avatar Michal Bielicki

Added configuration

added initscripts
added feeswitch user
added monit configuration
changed ownership to freeswitch:daemon
handle with care ... should work but a change in trunk can kill it any time :)


git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6416 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 54839c49
freeswitch (1.0~beta2-2) unstable; urgency=low
* Additional scripts for changing the user to freeswitch
Added Startup Scripts
Monit integration
Settings file for integration into init
init.d file
added user freeswitch to own and run all off freeswitch
cleaned up config file control
-- Michal Bielicki <michal.bielicki@voiceworks.pl> Tue, 27 Nov 2007 13:20:21 +0100
freeswitch (1.0~beta2-1) unstable; urgency=low
* New upstream release
-- Paul van Genderen <paulvg@member.fsf.org> Wed, 17 Oct 2007 19:32:09 +0200
freeswitch (1.0~beta1-1) unstable; urgency=low
* New packages.
......
/opt/freeswitch/conf/default_context_old.xml
/opt/freeswitch/conf/extensions.conf
/opt/freeswitch/conf/freeswitch.xml
/opt/freeswitch/conf/mime.types
/opt/freeswitch/conf/vars.xml
/opt/freeswitch/conf/autoload_configs/alsa.conf.xml
/opt/freeswitch/conf/autoload_configs/cdr.conf.xml
/opt/freeswitch/conf/autoload_configs/conference.conf.xml
/opt/freeswitch/conf/autoload_configs/console.conf.xml
/opt/freeswitch/conf/autoload_configs/dialplan_directory.conf.xml
/opt/freeswitch/conf/autoload_configs/dingaling.conf.xml
/opt/freeswitch/conf/autoload_configs/enum.conf.xml
/opt/freeswitch/conf/autoload_configs/event_multicast.conf.xml
/opt/freeswitch/conf/autoload_configs/event_socket.conf.xml
/opt/freeswitch/conf/autoload_configs/iax.conf.xml
/opt/freeswitch/conf/autoload_configs/ivr.conf.xml
/opt/freeswitch/conf/autoload_configs/java.conf.xml
/opt/freeswitch/conf/autoload_configs/limit.conf.xml
/opt/freeswitch/conf/autoload_configs/local_stream.conf.xml
/opt/freeswitch/conf/autoload_configs/modules.conf.xml
/opt/freeswitch/conf/autoload_configs/openmrcp.conf.xml
/opt/freeswitch/conf/autoload_configs/portaudio.conf.xml
/opt/freeswitch/conf/autoload_configs/post_load_modules.conf.xml
/opt/freeswitch/conf/autoload_configs/rss.conf.xml
/opt/freeswitch/conf/autoload_configs/sofia.conf.xml
/opt/freeswitch/conf/autoload_configs/spidermonkey.conf.xml
/opt/freeswitch/conf/autoload_configs/switch.conf.xml
/opt/freeswitch/conf/autoload_configs/syslog.conf.xml
/opt/freeswitch/conf/autoload_configs/voicemail.conf.xml
/opt/freeswitch/conf/autoload_configs/wanpipe.conf.xml
/opt/freeswitch/conf/autoload_configs/woomera.conf.xml
/opt/freeswitch/conf/autoload_configs/xml_cdr.conf.xml
/opt/freeswitch/conf/autoload_configs/xml_curl.conf.xml
/opt/freeswitch/conf/autoload_configs/xml_rpc.conf.xml
/opt/freeswitch/conf/autoload_configs/zeroconf.conf.xml
/opt/freeswitch/conf/dialplan/default.xml
/opt/freeswitch/conf/dialplan/US.conf.xml
/opt/freeswitch/conf/directory/default.xml
/opt/freeswitch/conf/lang/de/de.xml
/opt/freeswitch/conf/lang/de/demo/demo.xml
/opt/freeswitch/conf/lang/de/vm/tts.xml
/opt/freeswitch/conf/lang/en/en.xml
/opt/freeswitch/conf/lang/en/demo/demo.xml
/opt/freeswitch/conf/lang/en/vm/sounds.xml
/opt/freeswitch/conf/lang/en/vm/tts.xml
/opt/freeswitch/conf/lang/fr/fr.xml
/opt/freeswitch/conf/lang/fr/demo/demo.xml
/opt/freeswitch/conf/lang/fr/vm/sounds.xml
/opt/freeswitch/conf/sip_profiles/default.xml
/opt/freeswitch/conf/sip_profiles/nat.xml
Source: freeswitch
Maintainer: Michael Jerris <mike@jerris.com>
Section: net
Priority: optional
Build-Depends: automake, autoconf, libtool
Priority: extra
Build-Depends: debhelper (>= 5), automake1.9, autoconf, libtool, unixodbc-dev, libasound2-dev, libcurl3-dev, libssl-dev
Standards-Version: 3.7.2
Package: freeswitch
Architecture: any
Depends: ${shlibs:Depends}
Description: it is the winning
lalal fixme
Depends: ${shlibs:Depends}, unixodbc, libasound2, libcurl3, openssl
Suggests: monit
Description: A telephony platform that really kicks some ass...
FreeSWITCH is an open source telephony platform designed to facilitate the
creation of voice and chat driven products scaling from a soft-phone up to
a soft-switch. It can be used as a simple switching engine, a media gateway
or a media server to host IVR applications using simple scripts or XML to
control the callflow.
.
Homepage: http://some-project.some-place.org/
差异被折叠。
# Startup settings fffor freeswitch
# In this package install if monit is instaled it will automatically control
# start and stop of freeswitch
# Enable initd (let init handle start and stop of freeswitch)
USE_INIT="false"
opt/freeswitch
etc/opt
etc/monit
etc/default
.TH "FREESWITCH" "1" "October 10, 2007" "" ""
.nh
.ad l
.SH "NAME"
freeswitch \- Open Source telephony platform
.SH "SYNOPSIS"
.HP 7
\fBfreeswitch\fR [\fIoption\fR...]
.SH "DESCRIPTION"
.PP
This manual page documents briefly the
\fBfreeswitch\fR
command.
.PP
This manual page was written for the
Debian
distribution because we're too lame to write a real manual page. But we have a superb website over here:
.UR http://www.freeswitch.org/
.BR http://www.freeswitch.org/
.SH "SEE ALSO"
.PP
\fBundocumented\fR(7).
#! /bin/sh
### BEGIN INIT INFO
# Provides: freeswitch
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: The FreeSwitch Voice Switching System
# Description: An advanced platform for voice services
### END INIT INFO
# Author: Anthony Minesalle III <anthmct@yahoo.com>
#
# Do NOT "set -e"
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/opt/freeswitch/bin
DESC="FreeSwitch Voice Switching System"
NAME=freeswitch
DAEMON=/opt/freeswitch/bin/$NAME
DAEMON_ARGS="--options -nc"
USER=freeswitch
PIDFILE=/opt/freeswitch/log/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Check if we are being executed by init
. /etc/default/$NAME
CALLEDSCRIPT=`basename $0`
echo $CALLEDSCRIPT
case "$CALLEDSCRIPT" in
freeswitch)
;;
*)
if [ "USE_INIT" != "TRUE" ]; then
echo "FreeSwitch disabled" ;
exit 0 ;
fi
;;
esac
# Exit if the package is not installed
# [ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon -c $USER --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon -c $USER --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend
# on this one. As a last resort, sleep for some time.
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon -c $USER --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Wait for children to finish too if this is a daemon that forks
# and if the daemon is only ever run from this initscript.
# If the above conditions are not satisfied then add some other code
# that waits for the process to drop all resources that could be
# needed by services started subsequently. A last resort is to
# sleep for some time.
start-stop-daemon -c $USER --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
[ "$?" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
#
# If the daemon can reload its configuration without
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
start-stop-daemon -C $USER --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
return 0
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
#reload|force-reload)
#
# If do_reload() is not implemented then leave this commented out
# and leave 'force-reload' as an alias for 'restart'.
#
#log_daemon_msg "Reloading $DESC" "$NAME"
#do_reload
#log_end_msg $?
#;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 3
;;
esac
:
check process freeswitch with pidfile /var/run/freeswitch.pid
group voice
start program = "/etc/init.d/freeswitch start"
stop program = "/etc/init.d/freeswitch stop"
if failed port 5060 type UDP than restart
if 5 restarts within 5 cycles then timeout
depends on freeswitch_bin
depends on freeswitch_rc
check file freeswitch_bin with path /opt/freeswitch/bin/freeswitch
group voice
if failed checksum then unmonitor
if failed permission 755 then unmonitor
if failed uid freeswitch then unmonitor
if failed gid daemon then unmonitor
check file sendmail_rc with path /etc/init.d/freeswitch
group voice
if failed checksum then unmonitor
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
#!/bin/bash
chown -R freeswitch:daemon /opt/freeswitch
#!/bin/bash
userdel -r freeswitch
#!/bin/bash
adduser --home /opt/freeswitch --ingroup daemon --disabled-password --disabled-login --gecos "The FreeSwitch Voice Switching System" --no-create-home freeswitch
......@@ -5,35 +5,69 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export MODULES ?= mod_console mod_syslog mod_commands mod_conference mod_dptools mod_enum mod_fifo mod_openmrcp mod_amr mod_g711 mod_g722 mod_g723_1 mod_g726 mod_g729 mod_gsm mod_ilbc mod_l16 mod_speex mod_dialplan_xml mod_dialplan_asterisk mod_dingaling mod_iax mod_portaudio mod_sofia mod_woomera mod_openzap mod_event_multicast mod_event_socket mod_native_file mod_sndfile mod_local_stream mod_spidermonkey mod_spidermonkey_teletone mod_spidermonkey_core_db mod_spidermonkey_odbc mod_xml_rpc mod_xml_curl mod_xml_cdr mod_say_en mod_say_fr mod_say_de
ifndef AUTOCONF
AUTOCONFS := $(wildcard /usr/bin/autoconf*)
AUTOCONF = $(shell which autoconf)
ifneq (,$(findstring 2.50,${AUTOCONFS}))
AUTOCONF = /usr/bin/autoconf2.50
endif
endif
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
FEATURES = --enable-core-libedit-support --enable-core-odbc-support --with-libcurl --with-openssl
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
FEATURES += --disable-optimization
endif
config.status: configure
dh_testdir
./configure --prefix=/opt/freeswitch \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
CFLAGS="-D__VIA_HACK__" ${FEATURES}
configure: bootstrap.sh
AUTOCONF=${AUTOCONF} ./bootstrap.sh
build: build-stamp
build-stamp:
build-stamp: config.status
dh_testdir
# Add here commands to compile the package.
./bootstrap.sh
./configure
$(MAKE)
touch build-stamp
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp
rm -f build-stamp
# Add here commands to clean up after the build process.
-$(MAKE) clean megaclean
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
cp -f /usr/share/misc/config.sub build/config/config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess build/config/config.guess
endif
dh_clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/<packagename>
$(MAKE) install DESTDIR=`pwd`/debian/tmp
$(MAKE) DESTDIR=$(CURDIR)/debian/freeswitch install
# Build architecture-independent files here.
binary-indep: build install
......@@ -43,9 +77,9 @@ binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
# dh_installchangelogs
# dh_installdocs
# dh_installexamples
# dh_install
# dh_installmenu
# dh_installdebconf
......@@ -54,23 +88,27 @@ binary-arch: build install
# dh_installcatalogs
# dh_installpam
# dh_installmime
# dh_installinit
dh_installinit
# dh_installcron
# dh_installinfo
# dh_undocumented
dh_installman
dh_link
# dh_installman
dh_install debian/freeswitch.monitrc etc/monit
dh_install debian/default/freeswitch etc/default
dh_install debian/freeswitch.1 opt/man
dh_link opt/freeswitch/conf etc/opt/freeswitch
dh_strip
dh_compress
dh_fixperms
dh_fixperms --exclude /opt/freeswitch/conf
# dh_perl
# dh_python
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_shlibdeps --exclude=/opt/freeswitch
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
.PHONY: build clean binary-indep binary-arch binary install
# vim:set ai et sts=2 sw=2 tw=0:
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论