pentoo-overlay/dev-util/sonarqube-bin/files/sonar.init
2018-09-06 12:27:38 +02:00

29 lines
690 B
Text

#!/sbin/openrc-run
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
need net
}
run_dir="/opt/sonar"
command="/opt/sonar/bin/linux-multiarch.sh"
pidfile="$run_dir/sonarr.pid"
etc_dir="/etc/sonarqube"
log_dir="/var/log/sonarqube"
log_file="sonarr.log"
start() {
ebegin "Starting SonarQube"
start-stop-daemon --start --background --make-pidfile --pidfile ${pidfile} \
-u ${USER} -g ${GROUP} --exec ${command} -- --daemon \
--log=${log_dir}/${log_file}
eend $?
}
stop() {
ebegin "Stopping SonarQube"
start-stop-daemon --stop --pidfile ${pidfile} --retry 15
eend $?
}