MT#11263 Switch hardcoded list of service to system-tools/ngcp.inc

We are using grml-chroot here because prosody requires mounted /proc

Change-Id: I7c1130d2d9f870b9e5ff5d599d6e692d914158f8
changes/67/967/3
Alexander Lutay 10 years ago
parent cbdb86895b
commit e75b01441c

@ -1556,37 +1556,21 @@ EOT
;;
esac
# make sure all services are stopped
for service in \
apache2 \
asterisk \
collectd \
dnsmasq \
exim4 \
irqbalance \
kamailio-lb \
kamailio-proxy \
mediator \
monit \
mysql \
nfs-kernel-server \
ngcp-rate-o-mat \
ngcp-rtpengine-daemon \
ngcp-sems \
ntp \
rsyslog \
sems ; \
do
if [ -f $TARGET/etc/init.d/$service ] ; then
chroot $TARGET /etc/init.d/$service stop || true
NGCP_SERVICES_FILE="${TAGRET}/usr/share/ngcp-system-tools/ngcp.inc"
if ! [ -r "$NGCP_SERVICES_FILE" ]; then
echo "Error: File $NGCP_SERVICES_FILE not found. Exiting." >&2
exit 1
fi
# make sure services are stopped
. "$NGCP_SERVICES_FILE"
for service in ${HA_NGCP_SERVICES} ${NGCP_SERVICES} ${NON_NGCP_SERVICES} ; do
if [ -f "${TARGET}/etc/init.d/$service" ] ; then
echo "Stopping $service ..."
grml-chroot $TARGET /etc/init.d/$service stop || true
fi
done
if [ -f $TARGET/etc/init.d/prosody ] ; then
# prosody's init script requires mounted /proc
grml-chroot $TARGET /etc/init.d/prosody stop || true
fi
# nuke files
for i in $(find "$TARGET/var/log" -type f -size +0 -not -name \*.ini 2>/dev/null); do
:> "$i"

Loading…
Cancel
Save