Browse Source

TT#10155 split recording daemon into separate debian package

Change-Id: Iadbc629b8aa9e241fee3348bd957b4e0d4057fce
changes/90/11090/6
Richard Fuchs 9 years ago
committed by Michael Prokop
parent
commit
8b18bc5d23
6 changed files with 132 additions and 3 deletions
  1. +14
    -1
      debian/control
  2. +0
    -1
      debian/ngcp-rtpengine-daemon.install
  3. +9
    -0
      debian/ngcp-rtpengine-recording-daemon.default
  4. +106
    -0
      debian/ngcp-rtpengine-recording-daemon.init
  5. +1
    -0
      debian/ngcp-rtpengine-recording-daemon.install
  6. +2
    -1
      debian/rules

+ 14
- 1
debian/control View File

@ -24,7 +24,8 @@ Homepage: http://sipwise.com/
Package: ngcp-rtpengine-daemon
Architecture: any
Recommends: ngcp-rtpengine-utils
Recommends: ngcp-rtpengine-recording-daemon,
ngcp-rtpengine-utils
Suggests: ngcp-system-tools
Depends: lsb-base (>= 3.0-6),
${misc:Depends},
@ -37,6 +38,17 @@ Description: Proxy for RTP and media streams used in NGCP, userspace part.
This daemon handles the first stages of proxying media streams and talks to
the kernel part of the proxy for eventual high-performance packet forwarding.
Package: ngcp-rtpengine-recording-daemon
Architecture: any
Recommends: ngcp-rtpengine-utils
Suggests: ngcp-system-tools
Depends: lsb-base (>= 3.0-6),
nfs-common,
${misc:Depends},
${shlibs:Depends}
Description: Recording daemon for RTP and media streams
This daemon handles the call recording (media intercept) component of rtpengine.
Package: ngcp-rtpengine-iptables
Architecture: any
Depends: ${misc:Depends},
@ -51,6 +63,7 @@ Architecture: all
Depends: ngcp-rtpengine-daemon (>= ${source:Version}),
ngcp-rtpengine-iptables (>= ${source:Version}),
ngcp-rtpengine-kernel-dkms (>= ${source:Version}),
ngcp-rtpengine-recording-daemon (>= ${source:Version}),
ngcp-rtpengine-utils (>= ${source:Version})
Conflicts: ngcp-mediaproxy-ng
Replaces: ngcp-mediaproxy-ng


+ 0
- 1
debian/ngcp-rtpengine-daemon.install View File

@ -1,3 +1,2 @@
daemon/rtpengine /usr/sbin/
etc/rtpengine.sample.conf /etc/rtpengine/
recording-daemon/rtpengine-recording /usr/sbin/

+ 9
- 0
debian/ngcp-rtpengine-recording-daemon.default View File

@ -0,0 +1,9 @@
RUN_RTPENGINE_RECORDING=no
CONFIG_FILE=/etc/rtpengine/rtpengine-recording.conf
# CONFIG_SECTION=rtpengine-recording
PIDFILE=/var/run/ngcp-rtpengine-recording-daemon.pid
MUST_NFS=no
NFS_HOST=192.168.1.1
NFS_REMOTE_PATH=/var/recordings
NFS_LOCAL_MOUNT=/var/lib/rtpengine-recording # must match output-dir if used

+ 106
- 0
debian/ngcp-rtpengine-recording-daemon.init View File

@ -0,0 +1,106 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: ngcp-rtpengine-recording-daemon
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Should-Start: sshd
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Ngcp Rtpengine Recording Daemon
# Description: Recording daemon for RTP and other media streams
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
NAME=ngcp-rtpengine-recording-daemon
DESC="RTP/media recording daemon"
TABLE=0
DAEMON=$(which rtpengine-recording)
DEFAULTS=/etc/default/${NAME}
test -f "$DAEMON" || exit 0
# Load startup options if available
if [ -f "$DEFAULTS" ]; then
. "$DEFAULTS" || true
fi
if [ "$RUN_RTPENGINE_RECORDING" != "yes" ]; then
echo "rtpengine-recording not yet configured. Edit $DEFAULTS first."
exit 0
fi
[ -z "$PIDFILE" ] && PIDFILE="/var/run/rtpengine-recording.pid"
set -e
. /lib/lsb/init-functions
OPTIONS=""
[ -z "$CONFIG_FILE" ] || OPTIONS="$OPTIONS --config-file=$CONFIG_FILE"
[ -z "$PIDFILE" ] || OPTIONS="$OPTIONS --pidfile=$PIDFILE"
if [ -x /usr/sbin/ngcp-virt-identify ]; then
if /usr/sbin/ngcp-virt-identify --type container; then
VIRT="yes"
fi
fi
case "$1" in
start)
set +e
if [ -x "/usr/sbin/ngcp-check_active" ]; then
/usr/sbin/ngcp-check_active -q
status=$?
case "${status}" in
0|3)
echo "Active node or transition."
;;
*)
echo "Ignored start action in inactive node ($status)"
exit 0
;;
esac
fi
set -e
log_daemon_msg "Starting $DESC: $NAME"
if [ "$MUST_NFS" = yes ]; then
if ! egrep -q '^[^ :]+:[^ :]+ '"$NFS_LOCAL_MOUNT"' nfs.? ' /proc/mounts; then
log_progress_msg "Mounting NFS share"
test -d "$NFS_LOCAL_MOUNT" || mkdir -p "$NFS_LOCAL_MOUNT"
mount -t nfs -o hard,intr,tcp "$NFS_HOST":"$NFS_REMOTE_PATH" "$NFS_LOCAL_MOUNT"
fi
fi
start-stop-daemon --start --quiet --pidfile "$PIDFILE" \
--exec "$DAEMON" -- $OPTIONS || log_progress_msg " already running"
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping $DESC: $NAME"
start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
--exec "$DAEMON"
if [ "$?" -ne 0 ]; then
return $?
fi
rm -f $PIDFILE
log_end_msg $?
;;
force-reload|restart)
$0 stop
$0 start
;;
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2
exit 1
;;
esac
exit 0

+ 1
- 0
debian/ngcp-rtpengine-recording-daemon.install View File

@ -0,0 +1 @@
recording-daemon/rtpengine-recording /usr/sbin/

+ 2
- 1
debian/rules View File

@ -107,7 +107,8 @@ install: build
binary-arch: install \
ngcp-rtpengine-daemon \
ngcp-rtpengine-dbg \
ngcp-rtpengine-iptables
ngcp-rtpengine-iptables \
ngcp-rtpengine-recording-daemon
# Build architecture independant packages
binary-indep: build install \


Loading…
Cancel
Save