1
0
Fork 0

we need to substitute the package name here too - else enterprise pac… (#3025)

This commit is contained in:
Wilfried Goesgens 2017-08-17 21:27:44 +02:00 committed by Frank Celler
parent fadafa6384
commit b2bc8dee49
3 changed files with 13 additions and 11 deletions

View File

@ -62,21 +62,21 @@ db_stop
if test "@CPACK_SYSTEMD_FOUND@" -eq 1 ; then
# This will only remove masks created by d-s-h on package removal.
deb-systemd-helper unmask arangodb3.service >/dev/null || true
deb-systemd-helper unmask @CPACK_PACKAGE_NAME@.service >/dev/null || true
# was-enabled defaults to true, so new installations run enable.
if deb-systemd-helper --quiet was-enabled arangodb3.service; then
if deb-systemd-helper --quiet was-enabled @CPACK_PACKAGE_NAME@.service; then
# Enables the unit on first installation, creates new
# symlinks on upgrades if the unit file has changed.
deb-systemd-helper enable arangodb3.service >/dev/null || true
deb-systemd-helper enable @CPACK_PACKAGE_NAME@.service >/dev/null || true
else
# Update the statefile to add new symlinks (if any), which need to be
# cleaned up on purge. Also remove old symlinks.
deb-systemd-helper update-state arangodb3.service >/dev/null || true
deb-systemd-helper update-state @CPACK_PACKAGE_NAME@.service >/dev/null || true
fi
# Automatically added by dh_systemd_start
if [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
deb-systemd-invoke start arangodb3.service >/dev/null || true
deb-systemd-invoke start @CPACK_PACKAGE_NAME@.service >/dev/null || true
fi
# End automatically added section
else

View File

@ -3,13 +3,13 @@ set -e
# Automatically added by dh_installinit
if [ -x "/etc/init.d/arangodb3" ]; then
invoke-rc.d arangodb3 stop || exit $?
invoke-rc.d @CPACK_PACKAGE_NAME@ stop || exit $?
fi
# End automatically added section
set -e
# Automatically added by dh_systemd_start
if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
deb-systemd-invoke stop arangodb3.service >/dev/null
deb-systemd-invoke stop .service >/dev/null
fi
# End automatically added section

View File

@ -37,16 +37,18 @@ configure_file (
"${PROJECT_SOURCE_DIR}/Installation/debian/postinst.in"
"${PROJECT_BINARY_DIR}/Installation/debian/postinst"
NEWLINE_STYLE UNIX)
configure_file (
"${PROJECT_SOURCE_DIR}/Installation/debian/prerm.in"
"${PROJECT_BINARY_DIR}/Installation/debian/prerm"
NEWLINE_STYLE UNIX)
list(APPEND CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
"${PROJECT_BINARY_DIR}/Installation/debian/templates"
"${PROJECT_BINARY_DIR}/Installation/debian/config"
"${PROJECT_BINARY_DIR}/Installation/debian/postinst"
"${PROJECT_SOURCE_DIR}/Installation/debian/preinst"
"${PROJECT_SOURCE_DIR}/Installation/debian/postrm"
"${PROJECT_SOURCE_DIR}/Installation/debian/prerm")
"${PROJECT_SOURCE_DIR}/Installation/debian/postrm")
################################################################################
# specify which target archcitecture the package is going to be: