diff --git a/distribution/src/main/packaging/scripts/postrm b/distribution/src/main/packaging/scripts/postrm index 1b44d3a8b38..3dfc52e4474 100644 --- a/distribution/src/main/packaging/scripts/postrm +++ b/distribution/src/main/packaging/scripts/postrm @@ -68,7 +68,7 @@ fi if [ "$REMOVE_SERVICE" = "true" ]; then if command -v systemctl >/dev/null; then - systemctl --no-reload disable elasticsearch.service > /dev/null 2>&1 || true + systemctl disable elasticsearch.service > /dev/null 2>&1 || true fi if command -v chkconfig >/dev/null; then diff --git a/distribution/src/test/resources/packaging/scripts/40_rpm_package.bats b/distribution/src/test/resources/packaging/scripts/40_rpm_package.bats index 6a9007e4bbe..6d8aff66410 100644 --- a/distribution/src/test/resources/packaging/scripts/40_rpm_package.bats +++ b/distribution/src/test/resources/packaging/scripts/40_rpm_package.bats @@ -116,11 +116,6 @@ setup() { # The removal must disable the service # see prerm file if is_systemd; then - # Redhat based systemd distros usually returns exit code 1 - # OpenSUSE13 returns 0 - run systemctl status elasticsearch.service - [ "$status" -eq 1 ] || [ "$status" -eq 0 ] - run systemctl is-enabled elasticsearch.service [ "$status" -eq 1 ] fi