TT#36203 Remove services stop cycle

All used services in installer have to be manually stopped when
they aren't needed so we do not need such a stop cycle.

Moreover services with existing init.d script only can be stopped
in this way. Other services just produce error message:
Stopping <service name> ...
<service name>: unrecognized service

Change-Id: I9aec0b8aa7c4878e538532b9d8997e2438a1277f
changes/54/20954/2
Mykola Malkov 8 years ago
parent 2f5a4b6660
commit 72ed005c41

@ -1810,7 +1810,6 @@ EOT
die "Error during installation of ngcp. Find details at: ${TARGET}/tmp/ngcp-installer.log ${TARGET}/tmp/ngcp-installer-debug.log"
fi
# upload db dump only if we're deploying a trunk version
if $TRUNK_VERSION && checkBootParam ngcpupload ; then
set_deploy_status "prepare_translations"
grml-chroot $TARGET apt-get -y install ngcp-dev-tools
@ -1820,18 +1819,6 @@ EOT
set_deploy_status "ngcp-installer"
fi
NGCP_SERVICES_FILE="${TARGET}/usr/share/ngcp-system-tools/ngcp.inc"
if ! [ -r "$NGCP_SERVICES_FILE" ]; then
die "Error: File $NGCP_SERVICES_FILE not found. Exiting."
fi
# make sure services are stopped
. "$NGCP_SERVICES_FILE"
for service in ${HA_NGCP_SERVICES} ${NGCP_SERVICES} ${NON_NGCP_SERVICES} ; do
echo "Stopping ${service} ..."
grml-chroot ${TARGET} service "${service}" stop || true
done
# nuke files
find "${TARGET}/var/log" -type f -size +0 -not -name \*.ini -exec sh -c ":> \${1}" sh {} \;
:>$TARGET/var/run/utmp

Loading…
Cancel
Save