mirror of
https://github.com/pentoo/pentoo-overlay
synced 2025-12-15 04:45:20 +01:00
29 lines
690 B
Text
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 $?
|
|
}
|