MT#7505 Add .gitreview file

changes/44/244/1
Victor Seva 11 years ago
parent 24fb9b55fe
commit 4a98f838d1

@ -0,0 +1,4 @@
[gerrit]
host=gerrit.mgm.sipwise.com
port=29418
project=ngcp-schema

@ -2,27 +2,43 @@
set -e set -e
case "$1" in if [ -e /etc/default/ngcp-roles ]; then
configure) . /etc/default/ngcp-roles
if [ -x /etc/init.d/ngcp-panel ] ; then else
if [ -x "$(which invoke-rc.d 2>/dev/null)" ]; then NGCP_IS_MGMT="yes"
echo "Force-reloading ngcp-panel to handle schema changes" fi
invoke-rc.d ngcp-panel force-reload || exit $?
else do_reload()
echo "Force-reloading ngcp-panel to handle schema changes" {
/etc/init.d/ngcp-panel force-reload || exit $? if [ "${NGCP_IS_MGMT}" != "yes" ]; then
fi 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
fi
if [ -x /etc/init.d/ngcp-www-csc ] ; then if [ -x /etc/init.d/ngcp-www-csc ] ; then
if [ -x "$(which invoke-rc.d 2>/dev/null)" ]; then if [ -x "$(which invoke-rc.d 2>/dev/null)" ]; then
echo "Force-reloading ngcp-www-csc to handle schema changes" echo "Force-reloading ngcp-www-csc to handle schema changes"
invoke-rc.d ngcp-www-csc force-reload || exit $? invoke-rc.d ngcp-www-csc force-reload || exit $?
else else
echo "Force-reloading ngcp-www-csc to handle schema changes" echo "Force-reloading ngcp-www-csc to handle schema changes"
/etc/init.d/ngcp-www-csc force-reload || exit $? /etc/init.d/ngcp-www-csc force-reload || exit $?
fi
fi fi
fi
}
case "$1" in
configure)
do_reload
;; ;;
abort-upgrade|abort-remove|abort-deconfigure) abort-upgrade|abort-remove|abort-deconfigure)

@ -2,7 +2,19 @@
set -e set -e
if [ "$1" = "remove" ]; then 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 /etc/init.d/ngcp-panel ] ; then
if [ -x "$(which invoke-rc.d 2>/dev/null)" ]; then if [ -x "$(which invoke-rc.d 2>/dev/null)" ]; then
echo "Force-reloading ngcp-panel to handle schema changes" echo "Force-reloading ngcp-panel to handle schema changes"
@ -22,4 +34,10 @@ if [ "$1" = "remove" ]; then
/etc/init.d/ngcp-www-csc force-reload || exit $? /etc/init.d/ngcp-www-csc force-reload || exit $?
fi fi
fi fi
}
if [ "$1" = "remove" ]; then
do_reload
fi fi
exit 0

Loading…
Cancel
Save