mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-26 01:15:53 +00:00
Revert sonarqube to old install method
This commit is contained in:
@@ -14,7 +14,6 @@ update_os
|
||||
|
||||
JAVA_VERSION="21" setup_java
|
||||
PG_VERSION="17" setup_postgresql
|
||||
fetch_and_deploy_gh_release "sonarqube" "SonarSource/sonarqube" "tarball"
|
||||
|
||||
msg_info "Installing Postgresql"
|
||||
DB_NAME="sonarqube"
|
||||
@@ -31,11 +30,16 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME OWNER $DB_USER;"
|
||||
msg_ok "Installed PostgreSQL"
|
||||
|
||||
msg_info "Configuring SonarQube"
|
||||
temp_file=$(mktemp)
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/SonarSource/sonarqube/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
curl -fsSL "https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-${RELEASE}.zip" -o $temp_file
|
||||
unzip -q "$temp_file" -d /opt
|
||||
mv /opt/sonarqube-* /opt/sonarqube
|
||||
$STD useradd -r -m -U -d /opt/sonarqube -s /bin/bash sonarqube
|
||||
chown -R sonarqube:sonarqube /opt/sonarqube
|
||||
chmod -R 755 /opt/sonarqube
|
||||
mkdir -p /opt/sonarqube/conf
|
||||
cat <<EOF >/opt/sonarqube/conf/sonar.properties
|
||||
cat <<EOF >/opt/sonarqube/conf/sonar.properties
|
||||
sonar.jdbc.username=${DB_USER}
|
||||
sonar.jdbc.password=${DB_PASS}
|
||||
sonar.jdbc.url=jdbc:postgresql://localhost/${DB_NAME}
|
||||
@@ -43,6 +47,7 @@ sonar.web.host=0.0.0.0
|
||||
sonar.web.port=9000
|
||||
EOF
|
||||
chmod +x /opt/sonarqube/bin/linux-x86-64/sonar.sh
|
||||
echo ${RELEASE} >>~/.sonarqube
|
||||
msg_ok "Configured SonarQube"
|
||||
|
||||
msg_info "Creating Service"
|
||||
|
||||
Reference in New Issue
Block a user