MT#11125 don't restart prosody after install if node is not proxy

Change-Id: I57a84b241623cf7f86534912a7d976b41beed2b2
changes/24/824/1
Victor Seva 10 years ago
parent f1631d6762
commit 26c11e6e38

@ -1,4 +1,9 @@
#!/bin/sh
if [ -r /etc/default/ngcp-roles ] ; then
. /etc/default/ngcp-roles
else
NGCP_IS_PROXY=no
fi
case "$1" in
configure)
@ -15,13 +20,15 @@ case "$1" in
;;
esac
fi
if [ -x "/etc/init.d/prosody" ]; then
if [ -x "/etc/init.d/prosody" ] && [ "$NGCP_IS_PROXY" == "yes" ]; then
echo "Restarting prosody service"
if [ -x "$(which invoke-rc.d 2>/dev/null)" ]; then
invoke-rc.d prosody restart || true
else
/etc/init.d/prosody restart || true
fi
elif [ "$NGCP_IS_PROXY" != "yes" ]; then
echo "prosody restart skipped, no role 'proxy' assigned to node."
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)

Loading…
Cancel
Save