mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
init.d template: [#CONV-960].
This commit is contained in:
parent
bee9f2ea55
commit
c7a73d68ca
@ -79,7 +79,7 @@ stop()
|
||||
if isrun; then
|
||||
if [ -f "$LOCKFILE" ]; then
|
||||
rm -f "$LOCKFILE"
|
||||
kill -INT `cat "$PIDFILE"`
|
||||
kill -TERM `cat "$PIDFILE"`
|
||||
wait4done
|
||||
else
|
||||
echo "has been stopping already"
|
||||
@ -97,6 +97,34 @@ restart()
|
||||
start
|
||||
}
|
||||
|
||||
forcestop()
|
||||
{
|
||||
local EXIT_STATUS
|
||||
EXIT_STATUS=0
|
||||
|
||||
echo -n "Stop $PROGRAM service: "
|
||||
|
||||
if isrun; then
|
||||
if [ -f "$LOCKFILE" ]; then
|
||||
rm -f "$LOCKFILE"
|
||||
kill -9 `cat "$PIDFILE"`
|
||||
wait4done
|
||||
else
|
||||
echo "has been stopping already"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "DONE"
|
||||
return $EXIT_STATUS
|
||||
}
|
||||
|
||||
forcerestart()
|
||||
{
|
||||
forcestop
|
||||
start
|
||||
}
|
||||
|
||||
enable_cron()
|
||||
{
|
||||
sed -i 's/^#*//' "$CRONFILE"
|
||||
@ -122,6 +150,12 @@ case "$1" in
|
||||
restart)
|
||||
restart && enable_cron
|
||||
;;
|
||||
forcestop)
|
||||
disable_cron && forcestop
|
||||
;;
|
||||
forcerestart)
|
||||
forcerestart && enable_cron
|
||||
;;
|
||||
reload)
|
||||
restart
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user