aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tarantool/tarantool.initd
blob: 18bc5c128ff8cb5ba9fae64858ca3c05fb51609e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/sbin/openrc-run

INSTANCE=default
[ "${RC_SVCNAME}" != "${RC_SVCNAME##*.}" ] && INSTANCE=${RC_SVCNAME##*.}
command="/usr/bin/tarantoolctl"
command_user="${TARANTOOL_USER:-tarantool}"
command_args="start ${INSTANCE}"
pidfile="/run/${INSTANCE}.pid"

depend() {
        use logger dns
        need net
        after firewall
}

start_pre() {
	checkpath --owner ${TARANTOOL_USER:-tarantool}:${TARANTOOL_USER:-tarantool} \
		--directory --mode 0775 /var/log/tarantool /var/run/tarantool
}