From fb5c30ed8ce156e6cf3c96acc3004c070f8d520b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Mon, 25 Jul 2022 15:21:48 +0200 Subject: [PATCH] fixe kaputten merge --- bin/haproxy-maintenance | 1 - functions.sh | 101 ---------------------------------------- 2 files changed, 102 deletions(-) diff --git a/bin/haproxy-maintenance b/bin/haproxy-maintenance index 74083ab..bc40ace 100755 --- a/bin/haproxy-maintenance +++ b/bin/haproxy-maintenance @@ -1,4 +1,3 @@ -<<<<<<< HEAD #!/bin/bash function help() { diff --git a/functions.sh b/functions.sh index f284743..ff05bb9 100755 --- a/functions.sh +++ b/functions.sh @@ -1082,7 +1082,6 @@ getusedip () { } function getdbcreds_jra () { -<<<<<<< HEAD local APP_INST=/opt/atlassian/jira local JRA_HOME=$(awk -F "=" '/jira.home/ {gsub(/ /, "", $0); print $2}' "${APP_INST}/atlassian-jira/WEB-INF/classes/jira-application.properties") local DB_FILE="${JRA_HOME}/dbconfig.xml" @@ -1096,48 +1095,6 @@ function getdbcreds_jra () { DB_USER="$(grep -oPm1 "(?<=)[^<]+" ${DB_FILE})" DB_PWD="$(grep -oPm1 "(?<=)[^<]+" ${DB_FILE})" fi -||||||| ea90fa6 - case $# in - 0) - gojirahome - DB_FILE=dbconfig.xml - #cd - - ;; - 1) - DB_FILE=$1 - ;; - *) - echo "wrong number of arguments" - return 1 - ;; - esac - - DB_URL="$(grep -oPm1 "(?<=)[^<]+" ${DB_FILE})" - DB_USER="$(grep -oPm1 "(?<=)[^<]+" ${DB_FILE})" - DB_PWD="$(grep -oPm1 "(?<=)[^<]+" ${DB_FILE})" -======= - case $# in - 0) - gojirahome - DB_FILE=dbconfig.xml - #cd - - ;; - 1) - DB_FILE=$1 - ;; - *) - echo "wrong number of arguments" - return 1 - ;; - esac - - #DB_URL="$(grep -oPm1 "(?<=)[^<]+" ${DB_FILE})" - #DB_USER="$(grep -oPm1 "(?<=)[^<]+" ${DB_FILE})" - #DB_PWD="$(grep -oPm1 "(?<=)[^<]+" ${DB_FILE})" - DB_URL="$(xmllint --xpath "jira-database-config/jdbc-datasource/url/text()" ${DB_FILE})" - DB_USER="$(xmllint --xpath "jira-database-config/jdbc-datasource/username/text()" ${DB_FILE})" - DB_PWD="$(xmllint --xpath "jira-database-config/jdbc-datasource/password/text()" ${DB_FILE})" ->>>>>>> ec99f40ff41338646804e8b105b1d4ad7799a6db DB_HOST="$(echo $DB_URL|sed 's@^.*//@@;s@\(^.*\):\(.*\)/\(.*\)$@\1@')" DB_PORT="$(echo $DB_URL|sed 's@^.*//@@;s@\(^.*\):\(.*\)/\(.*\)$@\2@')" DB_NAME="$(echo $DB_URL|sed 's@^.*//@@;s@\(^.*\):\(.*\)/\(.*\)$@\3@')" @@ -1146,7 +1103,6 @@ function getdbcreds_jra () { } function getdbcreds_cnf () { -<<<<<<< HEAD local APP_INST=/opt/atlassian/confluence local CNF_HOME=$(awk -F "=" '/jira.home/ {gsub(/ /, "", $0); print $2}' "${APP_INST}/confluence/WEB-INF/classes/confluence-init.properties") local DB_FILE="${CNF_HOME}/confluence.cfg.xml" @@ -1160,48 +1116,6 @@ function getdbcreds_cnf () { DB_USER="$(grep -oPm1 "(?<=)[^<]+" ${DB_FILE})" DB_PWD="$(grep -oPm1 "(?<=)[^<]+" ${DB_FILE})" fi -||||||| ea90fa6 - case $# in - 0) - gocnfhome - DB_FILE=confluence.cfg.xml - ;; - 1) - DB_FILE=$1 - ;; - *) - echo "wrong number of arguments" - cd - - return 1 - ;; - esac - - DB_URL="$(grep -oPm1 "(?<=)[^<]+" ${DB_FILE})" - DB_USER="$(grep -oPm1 "(?<=)[^<]+" ${DB_FILE})" - DB_PWD="$(grep -oPm1 "(?<=)[^<]+" ${DB_FILE})" -======= - case $# in - 0) - gocnfhome - DB_FILE=confluence.cfg.xml - ;; - 1) - DB_FILE=$1 - ;; - *) - echo "wrong number of arguments" - cd - - return 1 - ;; - esac - -# DB_URL="$(grep -oPm1 "(?<=)[^<]+" ${DB_FILE})" -# DB_USER="$(grep -oPm1 "(?<=)[^<]+" ${DB_FILE})" -# DB_PWD="$(grep -oPm1 "(?<=)[^<]+" ${DB_FILE})" - DB_URL="$(xmllint --xpath "confluence-configuration/properties/property[@name='hibernate.connection.url']/text()" ${DB_FILE})" - DB_USER="$(xmllint --xpath "confluence-configuration/properties/property[@name='hibernate.connection.username']/text()" ${DB_FILE})" - DB_PWD="$(xmllint --xpath "confluence-configuration/properties/property[@name='hibernate.connection.password']/text()" ${DB_FILE})" ->>>>>>> ec99f40ff41338646804e8b105b1d4ad7799a6db DB_HOST="$(echo $DB_URL|sed 's@^.*//@@;s@\(^.*\):\(.*\)/\(.*\)$@\1@')" DB_PORT="$(echo $DB_URL|sed 's@^.*//@@;s@\(^.*\):\(.*\)/\(.*\)$@\2@')" DB_NAME="$(echo $DB_URL|sed 's@^.*//@@;s@\(^.*\):\(.*\)/\(.*\)$@\3@')" @@ -1260,7 +1174,6 @@ urldecode() { findlocallogins() { last -F -a $(for i in $(find /var/log -maxdepth 1 -name "wtmp*"|sort -h);do echo -n "-f $i ";done)|grep -v "pts/\|reboot\|wtmp"|awk '{print $4,$5,$7}'|uniq } -<<<<<<< HEAD getjrahomes() { local APP_INST=/opt/atlassian/jira @@ -1339,19 +1252,5 @@ gocnfshome() { cd "${APP_SHARED_HOME}" } -||||||| ea90fa6 -======= - -gojrahome() { - local APP_INST=/opt/atlassian/jira - cd $(awk -F "=" '/jira.home/ {gsub(/ /, "", $0); print $2}' "${APP_INST}/atlassian-jira/WEB-INF/classes/jira-application.properties") -} - -gojrashome() { - local APP_INST=/opt/atlassian/jira - local JIRA_HOME=$(awk -F "=" '/jira.home/ {gsub(/ /, "", $0); print $2}' "${APP_INST}/atlassian-jira/WEB-INF/classes/jira-application.properties") - [ -e "${JIRA_HOME}/cluster.properties" ] && cd $(awk -F "=" '/jira.shared.home/ {gsub(/ /, "", $0); print $2}' "${JIRA_HOME}/cluster.properties") || echo no shared home configured >&2 -} ->>>>>>> ec99f40ff41338646804e8b105b1d4ad7799a6db #EOF