mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-08 06:47:09 +02:00
40 lines
737 B
Plaintext
Executable File
40 lines
737 B
Plaintext
Executable File
#!/sbin/openrc-run
|
|
# Copyright 2013 Alpine Linux
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
extra_stopped_commands="compile"
|
|
|
|
: ${SVCHOME:=/var/lib/$SVCNAME}
|
|
: ${pidfile:=/var/run/${SVCNAME%%.*}/${SVCNAME#*.}.pid}
|
|
|
|
depend() {
|
|
use net
|
|
need localmount
|
|
}
|
|
compile() {
|
|
ebegin "Compiling configuration for ${SVCNAME}"
|
|
cd ${SVCHOME}
|
|
./clean.py
|
|
./compile.py
|
|
eend $?
|
|
}
|
|
|
|
start() {
|
|
compile || return 1
|
|
checkpath --directory --owner iris ${pidfile%/*}
|
|
ebegin "Starting ${SVCNAME}"
|
|
start-stop-daemon --exec ${SVCHOME}/run.py \
|
|
--pidfile $pidfile \
|
|
--chdir $SVCHOME \
|
|
--user iris:iris \
|
|
--background \
|
|
--stdout /dev/null \
|
|
--stderr /dev/null \
|
|
--wait 500 \
|
|
-- \
|
|
-P $pidfile \
|
|
$ARGS
|
|
|
|
eend $?
|
|
}
|