mirror of https://github.com/sipwise/rtpengine.git
We detangle the two actions so that they can be performed independently
and on different conditions. This makes it possible to start the
rtpengine-recording-daemon only on the active node, and on some
role-specific nodes, while mounting the NFS filesystem in other
nodes.
We do not remove the nfs-setup start from the recording daemon init
script as sysvinit does not honor dependencies during direct init.d
or service(8) invocations.
[gjover@sipwise.com: Adapt changes to sysvinit. ]
Change-Id: Ibb637c533c94bc3db119111460ca647a50a205af
(cherry picked from commit 0224a49162)
changes/80/28780/5
parent
d453aa24f3
commit
8e5b338dee
@ -0,0 +1,38 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: ngcp-rtpengine-recording-nfs-mount
|
||||
# Required-Start: $remote_fs $local_fs $remote_fs $syslog
|
||||
# Required-Stop: $remote_fs $local_fs $remote_fs $syslog
|
||||
# Should-Start: sshd
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: NGCP RTP/media Recording NFS mount point
|
||||
### END INIT INFO
|
||||
|
||||
set -e
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
###
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
ngcp-rtpengine-recording-nfs-setup start
|
||||
;;
|
||||
stop)
|
||||
ngcp-rtpengine-recording-nfs-setup stop
|
||||
;;
|
||||
force-reload|restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
grep -E -q "^[^ :]+:[^ :]+ $NFS_LOCAL_MOUNT nfs.? " /proc/mounts
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
Loading…
Reference in new issue