From d78fecde6cbf73124e82bbca22d7e61740bfbd54 Mon Sep 17 00:00:00 2001 From: wxybear Date: Sat, 26 Oct 2024 01:25:40 +0800 Subject: [PATCH] feat: refine grep regex and refine comments --- packages/clickhouse-server.postinstall | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/clickhouse-server.postinstall b/packages/clickhouse-server.postinstall index d245a5189d5..a4c37fc14fa 100644 --- a/packages/clickhouse-server.postinstall +++ b/packages/clickhouse-server.postinstall @@ -27,9 +27,9 @@ fi if [ "$1" = configure ] || [ -n "$not_deb_os" ]; then # 'ii' means install and installed - # ('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') + # ('ic' for installed but configuration incomplete) + # If it is the first installation, we might encounter the 'ic' (configuration incomplete) status when executing the postinst script + installed=$(dpkg -l | grep -E '^ii\s+clickhouse-server\s') # already installed, use the old "is-enabled" status if [ -n "$installed" ]; then status=$(systemctl is-enabled clickhouse-server 2>/dev/null)