mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
fix
This commit is contained in:
parent
0e0a0f6ee6
commit
bf5a2a60c9
19
debian/clickhouse-server.init
vendored
19
debian/clickhouse-server.init
vendored
@ -235,11 +235,20 @@ forcestop()
|
||||
}
|
||||
|
||||
|
||||
service_or_func()
|
||||
{
|
||||
if [ -x "/bin/systemctl" ] && [ -f /etc/systemd/system/clickhouse-server.service ] && [ -d /run/systemd/system ]; then
|
||||
service $PROGRAM $1
|
||||
else
|
||||
$1
|
||||
fi
|
||||
}
|
||||
|
||||
forcerestart()
|
||||
{
|
||||
forcestop
|
||||
# Should not use 'start' function if systemd active
|
||||
service $PROGRAM start
|
||||
service_or_func start
|
||||
}
|
||||
|
||||
use_cron()
|
||||
@ -302,16 +311,16 @@ main()
|
||||
restart
|
||||
;;
|
||||
condstart)
|
||||
is_running || service $PROGRAM start
|
||||
is_running || service_or_func start
|
||||
;;
|
||||
condstop)
|
||||
is_running && service $PROGRAM stop
|
||||
is_running && service_or_func stop
|
||||
;;
|
||||
condrestart)
|
||||
is_running && service $PROGRAM restart
|
||||
is_running && service_or_func restart
|
||||
;;
|
||||
condreload)
|
||||
is_running && service $PROGRAM restart
|
||||
is_running && service_or_func restart
|
||||
;;
|
||||
initdb)
|
||||
initdb
|
||||
|
Loading…
Reference in New Issue
Block a user