diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..d40da3d9 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,278 @@ +ngcp-sems (1.4.3+spce2.7.0) unstable; urgency=low + + * First version for NGCP 2.7 + * Make build fail when it fails. + + -- Andrew Pogrebennyk Mon, 10 Dec 2012 15:03:29 +0100 + +ngcp-sems (1.4.3+spce2.6.3) unstable; urgency=low + + * Only apply SBC-SDP-Filter for the RTP/AVP or RTP/SAVP profile + * Fix sst negotiation + * Build dbg package + + -- Jon Bonilla Wed, 21 Nov 2012 13:08:41 +0100 + +ngcp-sems (1.4.3+spce2.6.2) unstable; urgency=low + + [ Michael Prokop ] + * Provide postinst script, taking care of services restarts in HA mode + * Provide postrm script + + + [ jbonilla ] + * Re-add init stuff + * Disable installing default config files + * Don't run sems with the default no-configuration + * Remove debconf usage + + + [ apogrebennyk ] + * Create sems user/group and do other manipulations from stock postinst file. + * Remove frafos default stuff from postinst file + + -- Jon Bonilla Thu, 23 Aug 2012 19:39:30 +0200 + +ngcp-sems (1.4.3+spce2.6.1) unstable; urgency=low + + * Fix User-Agent and Max-Forwards in outbound requests. + * db_reg_agent: also stop RegistrationTimer thread on unclean shutdown. + + -- Andrew Pogrebennyk Mon, 20 Aug 2012 14:20:17 +0200 + +ngcp-sems (1.4.3+spce2.6.0) unstable; urgency=low + + * Sync with upstream 1.4.3. + + -- Andrew Pogrebennyk Thu, 09 Aug 2012 00:01:32 +0200 + +ngcp-sems (1.4.2+spce2.5.1) unstable; urgency=low + + * Update digest credentials on updateRegistration call. + + -- Andrew Pogrebennyk Fri, 25 May 2012 11:58:18 +0200 + +ngcp-sems (1.4.2+sipwise11) unstable; urgency=low + + * Fix broken tagging. + + -- Andrew Pogrebennyk Mon, 30 Apr 2012 11:05:29 +0200 + +ngcp-sems (1.4.2+sipwise10) unstable; urgency=low + + * Make SIP timers configurable. + + -- Andrew Pogrebennyk Mon, 30 Apr 2012 11:00:37 +0200 + +ngcp-sems (1.4.2+sipwise9) unstable; urgency=low + + [ apogrebennyk ] + * Click2Dial.cpp: port click2dial fixes to CE sems + * AmSdp.cpp,AmSdp.h: merge from upstream 1.4 branch up to ddb20bd (fix sdp filter) + * AmSipMsg.cpp,test_headers.cpp: fix parser when one hdr is a substring of another hdr (e.g. Allow and Allow-Events) + + -- Andrew Pogrebennyk Wed, 25 Apr 2012 16:53:04 +0200 + +ngcp-sems (1.4.2+sipwise8) unstable; urgency=low + + * Fix error handling in sw_vsc. + * Replace rewrite-rule AVP vars by their values directly in sw_vsc. + + -- Andreas Granig Tue, 27 Mar 2012 14:58:42 +0200 + +ngcp-sems (1.4.2+sipwise7) unstable; urgency=low + + * Fix issues in CF VSC handling. + + -- Andreas Granig Tue, 20 Mar 2012 20:50:23 +0100 + +ngcp-sems (1.4.2+sipwise6) unstable; urgency=low + + * Implement new CF handling in VSC. + + -- Andreas Granig Tue, 20 Mar 2012 18:36:42 +0100 + +ngcp-sems (1.4.2+sipwise5) unstable; urgency=low + + * Set suid_dumpable=2 in init script on start + * Fix SBC SDP filter. + + -- Andrew Pogrebennyk Mon, 05 Mar 2012 23:06:41 +0100 + +ngcp-sems (1.4.2+sipwise4) unstable; urgency=low + + * Adjust LSB header in init script. + + -- Andrew Pogrebennyk Mon, 20 Feb 2012 22:10:23 +0100 + +ngcp-sems (1.4.2+sipwise3) unstable; urgency=low + + * Merge with sayer/1.4-dbreg-fork branch + + -- Andrew Pogrebennyk Wed, 30 Nov 2011 15:24:18 +0100 + +ngcp-sems (1.4.2+sipwise2) unstable; urgency=low + + * Merge with sayer/1.4-dbreg branch + + -- Jon Bonilla Thu, 13 Oct 2011 10:01:40 +0100 + +ngcp-sems (1.4.2+sipwise1) unstable; urgency=low + + * Merge with upstream 1.4.2 + * Add db_reg_agent module from sems trunk + * Preserver reg_agent patches from 1.4.1 version + + -- Jon Bonilla Tue, 04 Oct 2011 10:01:40 +0100 + +ngcp-sems (1.4.1+sipwise4) unstable; urgency=low + + * Fix domain based rewrite rule handling. + * Add subscriber based rewrite rule handling as well. + + -- Andreas Granig Thu, 15 Sep 2011 15:30:14 +0200 + +ngcp-sems (1.4.1+sipwise3) unstable; urgency=low + + * Aligned sw_vsc to new rewrite rule db schema. + + -- Andreas Granig Tue, 13 Sep 2011 19:50:38 +0200 + +ngcp-sems (1.4.1+sipwise2) unstable; urgency=low + + * Enabled thread pool. + + -- Andreas Granig Fri, 10 Jun 2011 14:02:48 +0200 + +ngcp-sems (1.4.1+sipwise1) stable; urgency=low + + * Merge from upstream the latest 1.4.1 branch. + * Fixes xmlrpc socket handling. + + -- Andreas Granig Tue, 24 May 2011 18:04:44 +0200 + +ngcp-sems (1.4.1~sipwise3) unstable; urgency=low + + * Merge from upstream trunk to fix click2dial in combination with sbc. + + -- Andreas Granig Sat, 14 May 2011 01:08:08 +0200 + +ngcp-sems (1.4.1~sipwise2) unstable; urgency=low + + * Merge from upstream trunk for improved authentication handling. + + -- Andreas Granig Wed, 04 May 2011 22:01:06 +0200 + +ngcp-sems (1.4.1~sipwise1) unstable; urgency=low + + * Add configurable contact to reg_agent/registrar_client. + * Use expiry value of 3600. + + -- Andreas Granig Fri, 29 Apr 2011 23:59:06 +0200 + +ngcp-sems (1.4.0+trunk20110327) unstable; urgency=low + + * Updated to git upstream commit 863fe68cbae0a151709a5b5de3162f2eb759dde3 + - SBC support + - DSM support + - Parallel forking support + - and lots more, see 1.4 release info (plus parallel-fork patch) + + -- Andreas Granig Sun, 27 Mar 2011 17:05:49 +0200 + +ngcp-sems (1.1.1+svn4517) unstable; urgency=low + + * Apply patch from upstream to address building issue on squeeze: + - backwards compatible fixing DTMF detector state not being + defined completely any more in spandsp headers, + git upstram commit d0a1a827ac83d0a24a703ef0a00e7571a691ad49 - + http://svn.berlios.de/svnroot/repos/sems/trunk@1698 + + -- Michael Prokop Mon, 14 Mar 2011 23:58:53 +0100 + +ngcp-sems (1.1.1+svn4074) unstable; urgency=low + + * sw_vsc version svn4074 + + -- Jon Bonilla Sun, 27 Nov 2010 10:01:40 +0100 + +ngcp-sems (1.1.1+svn3541) unstable; urgency=low + + * sw_vsc version svn3541 + + -- Jon Bonilla Sun, 10 Oct 2010 10:01:40 +0100 + +ngcp-sems (1.1.1-8) unstable; urgency=low + + * sw_vsc version svn3192 + + -- Jon Bonilla Fri, 19 Mar 2010 10:01:40 +0100 + +ngcp-sems (1.1.1-6) unstable; urgency=low + + * sw_vsc version svn2762 + * Force to use spandsp for dtmf detection + + -- Jon Bonilla Fri, 19 Mar 2010 10:01:40 +0100 + +ngcp-sems (1.1.1-5) unstable; urgency=low + + * Postinstall scripts fixed + + -- Jon Bonilla Fri, 19 Mar 2010 10:01:40 +0100 + +ngcp-sems (1.1.1-4) unstable; urgency=low + + * Init and default scripts overwritten + + -- Jon Bonilla Fri, 19 Mar 2010 10:01:40 +0100 + +ngcp-sems (1.1.1-3) unstable; urgency=low + + * Init and default scripts added + + -- Jon Bonilla Fri, 19 Mar 2010 10:01:40 +0100 + +ngcp-sems (1.1.1-2) unstable; urgency=low + + * Package naming changed + + -- Jon Bonilla Fri, 19 Mar 2010 10:01:40 +0100 + +ngcp-sems (1.1.1-1) unstable; urgency=low + + * sw_vsc added for sipwise + + -- Jon Bonilla Fri, 19 Mar 2010 10:01:40 +0100 + + +ngcp-sems (1.1.0-1) unstable; urgency=low + + * DSM state machine scripting (it's cool!) + * an (experimental) ISDN gateway module + * binrpc: MT (SER->) and connection pool (->SER) + * MT xmlrpc server + * controlled server shutdown + * improved logging + * g722 in 8khz compat mode + * out of dialog request handling for modules & dialogs without + sessions + * audio file autorewind, AmAudio mixing + * SIP and media IP separately configurable + * UID/DID support for voicemail/-box/annrecorder + * and quite some bugs and mem leaks fixed, documentation, etc. + + -- Stefan Sayer Tue, 20 Jan 2009 18:11:25 +0100 + +ngcp-sems (1.1.0-0rc1) unstable; urgency=low + + * Debian Release Candidate 1 for 1.1. + + -- Stefan Sayer Mon, 8 Dec 2008 23:01:40 +0200 + +ngcp-sems (1.0.0-0pre1-r856M) unstable; urgency=low + + * Debian Release Candidate 1 for 1.0. + + -- Stefan Sayer Sun, 2 Mar 2002 23:41:31 +0200 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..7f8f011e --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..70e20a83 --- /dev/null +++ b/debian/control @@ -0,0 +1,67 @@ +Source: ngcp-sems +Section: net +Priority: optional +Maintainer: Sipwise Development Team +Build-Depends: debhelper (>= 7), + flite-dev, + libcurl-dev, + libev-dev, + libmysql++-dev, + libpcre3-dev, + libspandsp-dev, + libspeex-dev, + libssl-dev, + libxml2-dev, + openssl, + python-dev, + python-sip4-dev, + sip4 +Standards-Version: 3.9.3 + +Package: ngcp-sems +Architecture: any +Depends: adduser, + libpcrecpp0, + ngcp-sems-prompts, + ${misc:Depends}, + ${shlibs:Depends} +Suggests: ngcp-sems-python-modules +Conflicts: ngcp-sems-python-modules (<< ${Source-Version}) +Description: SIP Express Media Server, very fast and flexible SIP media server + SEMS, the SIP Express Media Server, is a free, high performance, extensible media + server for SIP (RFC3261) based VoIP services. It features voicemail, conferencing, + announcements, pre-call announcements, prepaid service, calling card service etc. + +Package: ngcp-sems-dbg +Architecture: any +Depends: ngcp-sems (= ${binary:Version}) +Replaces: ngcp-sems-ha-dbg, + sems-dbg +Description: Debugging symbols for Sems SIP Express Media Server + SEMS, the SIP Express Media Server, is a free, high performance, extensible media + server for SIP (RFC3261) based VoIP services. It features voicemail, conferencing, + announcements, pre-call announcements, prepaid service, calling card service etc. + . + This package provides debugging symbols enabled for SEMS. + +Package: ngcp-sems-python-modules +Architecture: any +Depends: ngcp-sems (= ${Source-Version}), + ${shlibs:Depends} +Description: contains the python modules for SEMS + This has been split out of the main SEMS package, so that SEMS will not + depend upon python. This module will enable you to use the applications using the embedded + python interpreter and script new applications in python. + +Package: ngcp-libsems1-dev +Architecture: any +Section: libdevel +Depends: ${misc:Depends} +Description: development files for SIP Express Media Server + SEMS, the SIP Express Media Server, is a free, high performance, + extensible media server for SIP (RFC3261) based VoIP services. + It features voicemail, conferencing, announcements, pre-call + announcements, prepaid service, calling card service etc. + . + This package contains the files needed to compile programs + against sems. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..3dc55914 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,19 @@ +This package was debianized by Stefan Sayer + on Wed Feb 6 20:46:22 CET 2008. + +All debian stuff was stolen and adapted from SER +(http://iptel.org/ser). + +It was downloaded from http://iptel.org/sems. + +Upstream Authors: Raphael Coeffic , +Stefan Sayer , Juha Heinanen, Maxim +Sobolev, Andreas Granig (see AUTHORS file for details) + +This software is copyright (c) 2002-2005 by FhG Fokus + +You are free to distribute this software under the terms of +the GNU General Public License. + +On Debian systems, the complete text of the GNU General Public +License can be found in the file `/usr/share/common-licenses/GPL. diff --git a/debian/ngcp-libsems1-dev.install b/debian/ngcp-libsems1-dev.install new file mode 100644 index 00000000..2771c450 --- /dev/null +++ b/debian/ngcp-libsems1-dev.install @@ -0,0 +1,10 @@ +Makefile.defs usr/include/sems/ +core/*.h usr/include/sems/ +core/SampleArray.cc usr/include/sems/ +core/amci usr/include/sems/ +core/ampi usr/include/sems/ +core/compat usr/include/sems/ +core/plug-in/Makefile.app_module usr/include/sems/plug-in/ +core/plug-in/Makefile.audio_module usr/include/sems/plug-in/ +core/rtp usr/include/sems/ +core/sip/*.h usr/include/sems/sip/ diff --git a/debian/ngcp-sems.postinst b/debian/ngcp-sems.postinst new file mode 100755 index 00000000..81ae8cde --- /dev/null +++ b/debian/ngcp-sems.postinst @@ -0,0 +1,82 @@ +#!/bin/bash + +set -e + +# don't do anything when called with other argument than configure +case "$1" in + configure) + ;; + abort-upgrade|abort-remove|abort-deconfigure) + exit 0 + ;; + *) + echo "postinst called with unknown argument \$1'" >&2 + exit 1 + ;; +esac + +restart_handler() { + if [ -x "/etc/init.d/sems" ]; then + if [ -x "$(which invoke-rc.d 2>/dev/null)" ]; then + invoke-rc.d sems restart || exit $? + else + /etc/init.d/sems restart || exit $? + fi + fi +} + +initscript_handler() { + if [ -x "/etc/init.d/sems" ]; then + update-rc.d sems defaults >/dev/null + invoke-rc.d sems start || exit $? + fi +} + +init_handler() { + # just invoke init script wrappers on ce systems since + # they do not provide ngcp-check_active and we don't + # have to handle inactive nodes + if ! [ -x "$(which ngcp-check_active 2>/dev/null)" ]; then + restart_handler + initscript_handler + else # do not restart daemon on inactive node in pro systems + if ngcp-check_active ; then + echo "Active node detected, restarting sems" + restart_handler + else + echo "Inactive node detected, ignoring request to restart sems" + fi + fi +} + +# add sems user +adduser --quiet --system --group --disabled-password --shell /bin/false \ +--gecos "SIP Express Media Server" --home /var/run/sems sems || true + +if [ -d /usr/doc -a ! -e /usr/doc/sems -a -d /usr/share/doc/sems ]; then + ln -sf ../share/doc/sems /usr/doc/sems +fi + +# create voicebox spool directory if +if [ ! -d /var/spool/voicebox ]; then + mkdir -p /var/spool/voicebox/ +fi + +# make directory writable for sems user +if [ -d /var/spool/voicebox ]; then + chown sems /var/spool/voicebox +fi + +init_handler + +echo "" +echo "***" +echo "Configuration of sems has finished." +echo "" +echo "To restart it when configuration has changed use '/etc/init.d/sems restart'" +echo "" +echo "To change it's configuration use 'dpkg-reconfigure sems'" +echo "***" +echo "" + +exit 0 diff --git a/debian/ngcp-sems.postrm b/debian/ngcp-sems.postrm new file mode 100755 index 00000000..35ab1385 --- /dev/null +++ b/debian/ngcp-sems.postrm @@ -0,0 +1,18 @@ +#!/bin/sh +# postrm script for ngcp-sems + +set -e + +removal_wrapper() { + # remove the init script only on ce systems, as the + # the pro system handle it inside the monitoring/HA setup + if ! [ -x "$(which ngcp-check_active 2>/dev/null)" ]; then + update-rc.d sems remove >/dev/null + fi +} + +if [ "$1" = "purge" ] ; then + removal_wrapper +fi + +exit 0 diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 00000000..a879d122 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,13 @@ +#!/bin/sh + +#DEBHELPER# + +if [ "$1" = "purge" ] ; then + # remove user/group on purge + deluser --quiet --remove-home sems &>/dev/null || true + # remove /etc/ser if empty + rmdir /etc/sems || true +fi + +exit 0 + diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..f7ba29d1 --- /dev/null +++ b/debian/rules @@ -0,0 +1,165 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. +# +# $Id: rules,v 1.7 2007/12/20 14:21:19 paka Exp $ +# +# History: +# -------- +# 2008-02-06 stolen from SER and adapted for SEMS (stefan) + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + +# This is the debhelper compatibility version to use. +# export DH_COMPAT=4 +# -- already set in compat +# force no striping (always include debug symbols for now) +export DEB_BUILD_OPTIONS:="$(DEB_BUILD_OPTIONS) debug" + +PYTHON_MODULES=ivr py_sems conf_auth mailbox pin_collect + +EXCLUDED_MODULES=gateway mp3 memcachedstore py_sems + +EXCLUDED_DSM_MODULES=mod_aws +EXCLUDED_DSM_PY_MODULES=mod_aws mod_py +CPPFLAGS += -DHAVE_XMLRPCPP_SSL +# for older than lenny add: +# -DHAVE_OLD_SPANDSP_CALLBACK + +ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) + CFLAGS += -g +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +configure: configure-stamp +configure-stamp: + dh_testdir +# Add here commands to configure the package. + + touch configure-stamp + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + +# Add here commands to compile the package. + USE_SPANDSP=yes LONG_DEBUG_MESSAGE=yes CPPFLAGS="$(CPPFLAGS)" \ + $(MAKE) \ + cfg-target=/etc/sems/ prefix=/usr \ + exclude_app_modules="$(EXCLUDED_MODULES)" \ + exclude_dsm_modules="$(EXCLUDED_DSM_MODULES)" \ + DESTDIR=$(CURDIR)/debian/ngcp-sems +#/usr/bin/docbook-to-man debian/ser.sgml > ser.1 + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + +# Add here commands to clean up after the build process. + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_install + dh_installdirs + +# Add here commands to install the package into debian/sems + USE_SPANDSP=yes LONG_DEBUG_MESSAGE=yes CPPFLAGS="$(CPPFLAGS)" \ + $(MAKE) -C core/ install \ + DESTDIR=$(CURDIR)/debian/ngcp-sems \ + prefix=/usr \ + cfg-target=/etc/sems/ + + USE_SPANDSP=yes LONG_DEBUG_MESSAGE=yes CPPFLAGS="$(CPPFLAGS)" \ + $(MAKE) -C tools/ install \ + DESTDIR=$(CURDIR)/debian/ngcp-sems \ + prefix=/usr \ + cfg-target=/etc/sems/ + + USE_SPANDSP=yes LONG_DEBUG_MESSAGE=yes CPPFLAGS="$(CPPFLAGS)" \ + $(MAKE) -C apps/ install \ + exclude_app_modules="$(EXCLUDED_MODULES) $(PYTHON_MODULES)" \ + exclude_dsm_modules="$(EXCLUDED_DSM_PY_MODULES)" \ + DESTDIR=$(CURDIR)/debian/ngcp-sems \ + prefix=/usr \ + cfg-target=/etc/sems/ + +# fix etc/ser dir location +# mv -f $(CURDIR)/debian/ser/usr/etc $(CURDIR)/debian/ser + +# install only the python modules + USE_SPANDSP=yes LONG_DEBUG_MESSAGE=yes CPPFLAGS="$(CPPFLAGS)" \ + $(MAKE) -C apps/ install \ + app_modules="$(PYTHON_MODULES)" \ + DESTDIR=$(CURDIR)/debian/ngcp-sems-python-modules \ + prefix=/usr \ + cfg-target=/etc/sems/ + +# install mod_py DSM module + USE_SPANDSP=yes LONG_DEBUG_MESSAGE=yes CPPFLAGS="$(CPPFLAGS)" \ + $(MAKE) -C apps/dsm/mods/mod_py install \ + DESTDIR=$(CURDIR)/debian/ngcp-sems-python-modules \ + prefix=/usr \ + cfg-target=/etc/sems/ + +# This single target is used to build all the packages, all at once, or +# one at a time. So keep in mind: any options passed to commands here will +# affect _all_ packages. Anything you want to only affect one package +# should be put in another target, such as the install target. +binary-common: + dh_testdir + dh_testroot + dh_installdocs doc/*.txt + dh_installdocs doc/dsm/ + dh_installexamples + dh_installmenu +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime + dh_installinit --name=sems -- defaults 23 + dh_installcron + dh_installman + dh_installinfo +# dh_undocumented + dh_installchangelogs + dh_link + dh_strip --dbg-package=ngcp-sems-dbg + dh_compress + dh_fixperms +# dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture-independent packages using the common target +binary-indep: build install +# (Uncomment this next line if you have such packages.) +# $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common +# We have nothing to do by default. + + +# Build architecture-dependent packages using the common target +binary-arch: build install + $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common + +# Any other binary targets build just one binary package at a time. +binary-%: build install + $(MAKE) -f debian/rules binary-common DH_OPTIONS=-p$* + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure + diff --git a/debian/sems.default b/debian/sems.default new file mode 100644 index 00000000..37cd0676 --- /dev/null +++ b/debian/sems.default @@ -0,0 +1,37 @@ +# configuration for SEMS - SIP Express Media Server +# +# this file is sourced by SEMS init script /etc/init.d/sems + +# Note: the #DEBCONF-xxx-START and DEBCONF-xxx-END lines are used for +# debconf configuration, please don't remove or alter them. + +# Don't start with default config as we need to deploy the ngcp-templates first +SEMS_RUN="no" + +# ser configuration file +#DEBCONF-CFG_FILE-START +SEMS_CFG_FILE="/etc/sems/sems.conf" +#DEBCONF-CFG_FILE-END + +# user to run ser as +#DEBCONF-USER-START +SEMS_USER="sems" +#DEBCONF-USER-END + +# group to run ser as +#DEBCONF-GROUP-START +SEMS_GROUP="sems" +#DEBCONF-GROUP-END + +# ser pidfile +SEMS_PIDFILE="/var/run/sems/sems.pid" + +# set if you want to create core files +#DEBCONF-CREATE_CORE-START +SEMS_CREATE_CORE="yes" +#DEBCONF-CREATE_CORE-END + +#DEBCONF-COREDIR-START +SEMS_COREDIR="/var/cores" +#DEBCONF-COREDIR-END + diff --git a/debian/sems.init b/debian/sems.init new file mode 100644 index 00000000..1860a535 --- /dev/null +++ b/debian/sems.init @@ -0,0 +1,129 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: sems +# Required-Start: $local_fs $remote_fs $network $syslog +# Required-Stop: $local_fs $remote_fs $network $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Should-Start: mysql +# Should-Stop: mysql +# Short-Description: Start/stop SEMS Application Server +### END INIT INFO + + +# read configuration from /etc/default/sems file +if test -f /etc/default/sems ; then + . /etc/default/sems +fi + +if test "$SEMS_RUN" = "no" ; then + echo -ne "Sems start disabled by default file" + exit 0 +fi + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/sems +NAME=sems +DESC=sems + +PARAMS="" + +if test "$SEMS_PIDFILE" ; then + PARAMS="$PARAMS -P $SEMS_PIDFILE" +fi + +if test "$SEMS_USER" ; then + PARAMS="$PARAMS -u $SEMS_USER" +fi + +if test "$SEMS_GROUP" ; then + PARAMS="$PARAMS -g $SEMS_GROUP" +fi + +if test "$SEMS_CFG_FILE" ; then + PARAMS="$PARAMS -f $SEMS_CFG_FILE" + CFGPARAMS="-f $SEMS_CFG_FILE" +fi + +if test "$SEMS_CREATE_CORE" = "yes" ; then + # directory for the core dump files + [ -d $SEMS_COREDIR ] || mkdir $SEMS_COREDIR + chmod 777 $SEMS_COREDIR + echo "$SEMS_COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern + echo 2 > /proc/sys/fs/suid_dumpable + ulimit -c unlimited +fi + +if ! test -f $DAEMON ; then + echo "Error: cannot find $DAEMON" + exit 0 +fi + +LD_LIBRARY_PATH=/usr/lib/sems +export LD_LIBRARY_PATH + +set -e + +. /lib/lsb/init-functions + +case "$1" in + start) + echo "Starting $DESC: $NAME" + start-stop-daemon --start --quiet --oknodo --pidfile $SEMS_PIDFILE \ + --exec $DAEMON -- $PARAMS + log_end_msg $? + ;; + stop) + echo -n "Stopping $DESC: $NAME" + start-stop-daemon --oknodo --stop --quiet --pidfile $SEMS_PIDFILE \ + --exec $DAEMON + log_end_msg $? + ;; + #reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + # echo "Reloading $DESC configuration files." + # start-stop-daemon --stop --signal 1 --quiet --pidfile \ + # $SEMS_PIDFILE --exec $DAEMON + #;; + restart|force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart". + # + # Check if configuration is valid before restarting the server + #(($DAEMON $CFGPARAMS -c 2>&1) | grep "config file ok, exiting") > /dev/null + #if [ $? -ne 0 ]; then + # ($DAEMON $CFGPARAMS -c 2>&1) + # echo -e "\nThere are errors in the configuration file. Please fix them first" + # echo -e "\n$out\n" + # exit 0 + #fi + + echo "Restarting $DESC: $NAME" + start-stop-daemon --oknodo --stop --quiet --pidfile \ + $SEMS_PIDFILE --exec $DAEMON + sleep 5 + start-stop-daemon --start --quiet --pidfile \ + $SEMS_PIDFILE --exec $DAEMON -- $PARAMS + echo "." + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + *) + N=/etc/init.d/$NAME + # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0 + diff --git a/debian/shlibs.local b/debian/shlibs.local new file mode 100644 index 00000000..e69de29b diff --git a/debian/watch b/debian/watch new file mode 100644 index 00000000..0b49c6ef --- /dev/null +++ b/debian/watch @@ -0,0 +1,7 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +version=2 + +# Site Directory Pattern Version Script +ftp://ftp.berlios.de/pub/sems/latest/src/sems-(.*)_src\.tar\.gz debian uupdate