From f56653f43ee40e626bb3b8e913735e60edf03d15 Mon Sep 17 00:00:00 2001 From: Zhichang Yu Date: Wed, 8 Jan 2020 14:13:14 +0800 Subject: [PATCH] ensure network be up before staring clickhouse --- debian/clickhouse-server.init | 4 ++-- debian/clickhouse-server.service | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/clickhouse-server.init b/debian/clickhouse-server.init index 32282756719..213da9affb9 100755 --- a/debian/clickhouse-server.init +++ b/debian/clickhouse-server.init @@ -3,8 +3,8 @@ # Provides: clickhouse-server # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Required-Start: -# Required-Stop: +# Required-Start: $network +# Required-Stop: $network # Short-Description: Yandex clickhouse-server daemon ### END INIT INFO diff --git a/debian/clickhouse-server.service b/debian/clickhouse-server.service index 4543b304197..b9681f9279e 100644 --- a/debian/clickhouse-server.service +++ b/debian/clickhouse-server.service @@ -1,5 +1,7 @@ [Unit] Description=ClickHouse Server (analytic DBMS for big data) +Requires=network-online.target +After=network-online.target [Service] Type=simple