You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
791 B
37 lines
791 B
#!/sbin/openrc-run
|
|
# Copyright 1999-2018 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
depend() {
|
|
need net
|
|
use dns logger mysql postgresql
|
|
}
|
|
|
|
runResin() {
|
|
JAVA_HOME=$(java-config -O)
|
|
[ -n "${GENTOO_VM}" ] && JAVA_HOME=$(java-config --select-vm="${GENTOO_VM}" -O)
|
|
export JAVA_HOME
|
|
|
|
local extraArgs=
|
|
if [ "${VERBOSE}" = "yes" ]; then
|
|
extraArgs="-verbose"
|
|
fi
|
|
|
|
local msg="${1}"
|
|
shift
|
|
|
|
local cmdline="${JAVA_HOME}/bin/java -jar /usr/share/resin/lib/resin.jar -conf /etc/resin/resin.xml -server \"${SERVER_ID}\" -resin-home __RESIN_HOME__ -root-directory __RESIN_HOME__ ${extraArgs} ${@}"
|
|
|
|
ebegin "${msg}"
|
|
su - resin -c "${cmdline}"
|
|
eend $?
|
|
}
|
|
|
|
start() {
|
|
runResin "Starting Resin" "start"
|
|
}
|
|
|
|
stop() {
|
|
runResin "Stopping Resin" "shutdown"
|
|
}
|