You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcp-schema/debian/ngcp-schema.postrm

44 lines
1.0 KiB

#!/bin/sh
set -e
if [ -e /etc/default/ngcp-roles ]; then
. /etc/default/ngcp-roles
else
NGCP_IS_MGMT="yes"
fi
do_reload()
{
if [ "${NGCP_IS_MGMT}" != "yes" ]; then
echo "no mgmt role detected. Skip ngcp-panel and ngcp-www-csc reloads"
return
fi
if [ -x /etc/init.d/ngcp-panel ] ; then
if [ -x "$(which invoke-rc.d 2>/dev/null)" ]; then
echo "Force-reloading ngcp-panel to handle schema changes"
invoke-rc.d ngcp-panel force-reload || exit $?
else
echo "Force-reloading ngcp-panel to handle schema changes"
/etc/init.d/ngcp-panel force-reload || exit $?
fi
fi
if [ -x /etc/init.d/ngcp-www-csc ] ; then
if [ -x "$(which invoke-rc.d 2>/dev/null)" ]; then
echo "Force-reloading ngcp-www-csc to handle schema changes"
invoke-rc.d ngcp-www-csc force-reload || exit $?
else
echo "Force-reloading ngcp-www-csc to handle schema changes"
/etc/init.d/ngcp-www-csc force-reload || exit $?
fi
fi
}
if [ "$1" = "remove" ]; then
do_reload
fi
exit 0