mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
CLICKHOUSE-4511 Fix forcerestart with systemd
This commit is contained in:
parent
c280907f09
commit
0e0a0f6ee6
14
debian/clickhouse-server.init
vendored
14
debian/clickhouse-server.init
vendored
@ -238,7 +238,8 @@ forcestop()
|
||||
forcerestart()
|
||||
{
|
||||
forcestop
|
||||
start
|
||||
# Should not use 'start' function if systemd active
|
||||
service $PROGRAM start
|
||||
}
|
||||
|
||||
use_cron()
|
||||
@ -291,7 +292,8 @@ main()
|
||||
restart && enable_cron
|
||||
;;
|
||||
forcestop)
|
||||
disable_cron && forcestop
|
||||
disable_cron
|
||||
forcestop
|
||||
;;
|
||||
forcerestart)
|
||||
forcerestart && enable_cron
|
||||
@ -300,16 +302,16 @@ main()
|
||||
restart
|
||||
;;
|
||||
condstart)
|
||||
is_running || start
|
||||
is_running || service $PROGRAM start
|
||||
;;
|
||||
condstop)
|
||||
is_running && stop
|
||||
is_running && service $PROGRAM stop
|
||||
;;
|
||||
condrestart)
|
||||
is_running && restart
|
||||
is_running && service $PROGRAM restart
|
||||
;;
|
||||
condreload)
|
||||
is_running && restart
|
||||
is_running && service $PROGRAM restart
|
||||
;;
|
||||
initdb)
|
||||
initdb
|
||||
|
3
debian/clickhouse-server.service
vendored
3
debian/clickhouse-server.service
vendored
@ -7,7 +7,8 @@ User=clickhouse
|
||||
Group=clickhouse
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
ExecStart=/usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.xml
|
||||
RuntimeDirectory=clickhouse-server
|
||||
ExecStart=/usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.xml --pid-file=/run/clickhouse-server/clickhouse-server.pid
|
||||
LimitCORE=infinity
|
||||
LimitNOFILE=500000
|
||||
CapabilityBoundingSet=CAP_NET_ADMIN CAP_IPC_LOCK
|
||||
|
@ -1083,7 +1083,7 @@ void BaseDaemon::initialize(Application & self)
|
||||
}
|
||||
|
||||
/// Create pid file.
|
||||
if (is_daemon && config().has("pid"))
|
||||
if (config().has("pid"))
|
||||
pid.seed(config().getString("pid"));
|
||||
|
||||
/// Change path for logging.
|
||||
|
Loading…
Reference in New Issue
Block a user