mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-11-06 03:12:04 +01:00
34 lines
598 B
Bash
34 lines
598 B
Bash
#!/sbin/openrc-run
|
|
description="Initialize Lapis Server"
|
|
lver=5.2
|
|
command="/usr/bin/lapis$lver"
|
|
command_args="server production"
|
|
pidfile="/var/run/nginx/nginx.pid"
|
|
lapis_path=/usr/share/lapis
|
|
|
|
depend() {
|
|
need net
|
|
}
|
|
|
|
start_pre() {
|
|
checkpath --directory --owner nginx:nginx ${pidfile%/*}
|
|
}
|
|
|
|
start() {
|
|
ebegin "Starting Lapis"
|
|
start-stop-daemon --start \
|
|
--chdir ${lapis_path} \
|
|
--exec ${command} ${command_args} \
|
|
-b --make-pidfile \
|
|
--pidfile "${pidfile}"
|
|
eend $?
|
|
}
|
|
|
|
stop() {
|
|
ebegin "Stopping Lapis"
|
|
start-stop-daemon --stop \
|
|
--exec ${command} \
|
|
--pidfile "${pidfile}"
|
|
eend $?
|
|
}
|