diff --git a/debian/ngcp-sems-libsems1-dev.install b/debian/ngcp-sems-libsems1-dev.install new file mode 100644 index 00000000..1f77c7cc --- /dev/null +++ b/debian/ngcp-sems-libsems1-dev.install @@ -0,0 +1,13 @@ +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/*.c usr/include/sems/compat/ +core/compat/*.h usr/include/sems/compat/ +core/compat/getarch usr/include/sems/compat/ +core/compat/getos usr/include/sems/compat/ +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.default b/debian/ngcp-sems.default index b9e25941..f20d72b0 100644 --- a/debian/ngcp-sems.default +++ b/debian/ngcp-sems.default @@ -10,12 +10,12 @@ SEMS_RUN="no" # ser configuration file #DEBCONF-CFG_FILE-START -SEMS_CFG_FILE="/etc/sems/sems.conf" +SEMS_CFG_FILE="/etc/ngcp-sems/sems.conf" #DEBCONF-CFG_FILE-END # user to run ser as #DEBCONF-USER-START -SEMS_USER="sems-pbx" +SEMS_USER="sems" #DEBCONF-USER-END # group to run ser as @@ -23,10 +23,10 @@ SEMS_USER="sems-pbx" SEMS_GROUP="sems-pbx" #DEBCONF-GROUP-END -SEMS_RUNDIR="/var/run/sems" +SEMS_RUNDIR="/var/run/ngcp-sems" # sems pidfile -SEMS_PIDFILE="$SEMS_RUNDIR/sems.pid" +SEMS_PIDFILE="$SEMS_RUNDIR/ngcp-sems.pid" # set if you want to create core files #DEBCONF-CREATE_CORE-START diff --git a/debian/ngcp-sems.init b/debian/ngcp-sems.init index bf0b2a0a..4e360121 100644 --- a/debian/ngcp-sems.init +++ b/debian/ngcp-sems.init @@ -77,9 +77,11 @@ set -e case "$1" in start) - if ! /usr/sbin/ngcp-check_active -q; then - echo "Ignored start action in inactive node" - exit 0 + if [ -x /usr/sbin/ngcp-check_active ]; then + if ! /usr/sbin/ngcp-check_active -q; then + echo "Ignored start action in inactive node" + exit 0 + fi fi echo "Starting $DESC: $NAME" start-stop-daemon --start --quiet --oknodo --pidfile $SEMS_PIDFILE \ @@ -96,9 +98,11 @@ case "$1" in echo "Restarting $DESC: $NAME" start-stop-daemon --oknodo --stop --quiet --pidfile \ $SEMS_PIDFILE --exec $DAEMON - if ! /usr/sbin/ngcp-check_active -q; then - echo "Ignored start action in inactive node" - exit 0 + if [ -x /usr/sbin/ngcp-check_active ]; then + if ! /usr/sbin/ngcp-check_active -q; then + echo "Ignored start action in inactive node" + exit 0 + fi fi sleep 5 start-stop-daemon --start --quiet --pidfile \ diff --git a/debian/ngcp-sems.postinst b/debian/ngcp-sems.postinst index ef5ea664..443ad147 100644 --- a/debian/ngcp-sems.postinst +++ b/debian/ngcp-sems.postinst @@ -2,6 +2,9 @@ set -e +dpkg-maintscript-helper rm_conffile /etc/default/sems -- "$@" +dpkg-maintscript-helper rm_conffile /etc/init.d/sems -- "$@" + # don't do anything when called with other argument than configure case "$1" in configure) diff --git a/debian/ngcp-sems.preinst b/debian/ngcp-sems.preinst new file mode 100644 index 00000000..d91d7457 --- /dev/null +++ b/debian/ngcp-sems.preinst @@ -0,0 +1,13 @@ +#!/bin/sh +set -e + +if [ -x "/etc/init.d/sems" ]; then + update-rc.d sems remove >/dev/null +fi + +dpkg-maintscript-helper rm_conffile /etc/default/sems -- "$@" +dpkg-maintscript-helper rm_conffile /etc/init.d/sems -- "$@" + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules index 08734c98..5ce0d67e 100644 --- a/debian/rules +++ b/debian/rules @@ -6,7 +6,7 @@ export DH_VERBOSE=1 PYTHON_MODULES=ivr conf_auth mailbox pin_collect -EXCLUDED_MODULES=gateway examples mp3 twit +EXCLUDED_MODULES=gateway mp3 twit EXCLUDED_DSM_MODULES=mod_aws EXCLUDED_DSM_PY_MODULES=mod_aws mod_py @@ -15,6 +15,8 @@ CPPFLAGS += -DHAVE_XMLRPCPP_SSL export USE_SPANDSP=yes LONG_DEBUG_MESSAGE=yes CPPFLAGS="$(CPPFLAGS)" +export APP_NAME=ngcp-sems + %: dh $@