Update clickhouse-server.postinstall

This commit is contained in:
Alexey Milovidov 2024-10-25 17:19:12 +02:00 committed by GitHub
parent 09a5fbc0f6
commit 7a133e0a7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,8 +26,11 @@ if [ ! -f "/etc/debian_version" ]; then
fi fi
if [ "$1" = configure ] || [ -n "$not_deb_os" ]; then if [ "$1" = configure ] || [ -n "$not_deb_os" ]; then
installed=$(dpkg -l | grep "^ii\s\+clickhouse-server ") # 'ii' means install and installed
# already installed, use old "is-enabled" status # ('ic' for Installed but configuration incomplete)
# If it is the first installation, we might encounter the 'ic' (Incomplete) status when executing the postinst script
installed=$(dpkg -l | grep '^ii\s+clickhouse-server')
# already installed, use the old "is-enabled" status
if [ -n "$installed" ]; then if [ -n "$installed" ]; then
status=$(systemctl is-enabled clickhouse-server 2>/dev/null) status=$(systemctl is-enabled clickhouse-server 2>/dev/null)
fi fi