Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PA service stop before install and uninstall #2062

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions scripts/pkg/build_templates/opensearch/opensearch.rpm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ if command -v systemctl >/dev/null && systemctl is-active %{name}.service >/dev/
echo "Stop existing %{name}.service"
systemctl --no-reload stop %{name}.service
fi
if command -v systemctl >/dev/null && systemctl is-active opensearch-performance-analyzer.service >/dev/null; then
echo "Stop existing opensearch-performance-analyzer.service"
systemctl --no-reload stop opensearch-performance-analyzer.service
fi
# Create user and group if they do not already exist.
getent group %{name} > /dev/null 2>&1 || groupadd -r %{name}
getent passwd %{name} > /dev/null 2>&1 || \
Expand Down Expand Up @@ -121,6 +125,10 @@ if command -v systemctl >/dev/null && systemctl is-active %{name}.service >/dev/
echo "Stop existing %{name}.service"
systemctl --no-reload stop %{name}.service
fi
if command -v systemctl >/dev/null && systemctl is-active opensearch-performance-analyzer.service >/dev/null; then
echo "Stop existing opensearch-performance-analyzer.service"
systemctl --no-reload stop opensearch-performance-analyzer.service
fi
exit 0

%files
Expand Down