|
root / examples / with-stop-script / service.toml
service.toml TOML 21 lines 556 B
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# Example: daemon with a companion stop script.
#
# Some services need an explicit shutdown sequence rather than just
# being signaled. The [exec].stop field references a script in the
# same directory. zyginit runs it with a stop timeout (default 60s)
# before falling back to SIGKILL.

[service]
type = "daemon"
description = "Database daemon with graceful shutdown"

[exec]
start = "./start.sh"
stop = "./stop.sh"
user = "dbuser"

[stop]
# How long zyginit waits for stop.sh to finish before escalating
# to SIGKILL. Default is 60 seconds.
timeout = 30