TT#26264 Remove maintainer script directly calling init scripts

We are in the process of removing the obsolete init scripts, so trying
to use them directly will make these operations not work at all.

In addition these actions are always denied on NGCP via our permanent
policy-rc.d, so there is no point in even trying.

Change-Id: I0ef824b419f8e48c06c240889626fb3fea43d61e
changes/05/20305/2
Guillem Jover 8 years ago
parent a0418df715
commit c17d29512c

@ -1,43 +0,0 @@
#!/bin/sh
if [ -r /etc/default/ngcp-roles ] ; then
. /etc/default/ngcp-roles
else
NGCP_IS_PROXY=no
fi
case "$1" in
configure)
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
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)
exit 0
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
Loading…
Cancel
Save