<groupId>org.onap.holmes.rule-management</groupId>
<artifactId>holmes-rulemgt-parent</artifactId>
- <version>1.3.1-SNAPSHOT</version>
+ <version>1.3.2-SNAPSHOT</version>
<packaging>pom</packaging>
<name>holmes-rule-management</name>
<modules>
<parent>
<groupId>org.onap.holmes.rule-management</groupId>
<artifactId>holmes-rulemgt-parent</artifactId>
- <version>1.3.1-SNAPSHOT</version>
+ <version>1.3.2-SNAPSHOT</version>
</parent>
<artifactId>holmes-rulemgt-frontend</artifactId>
<parent>
<groupId>org.onap.holmes.rule-management</groupId>
<artifactId>holmes-rulemgt-parent</artifactId>
- <version>1.3.1-SNAPSHOT</version>
+ <version>1.3.2-SNAPSHOT</version>
</parent>
<artifactId>holmes-rulemgt-standalone</artifactId>
echo "Initializing the holmes rule management database..."
main_path=$HOME/..
-sed -i "s|DBNAME|$dbname|g" "$main_path/dbscripts/postgresql/onap-holmes_rulemgt-createobj.sql"
-sed -i "s|DBUSER|$user|g" "$main_path/dbscripts/postgresql/onap-holmes_rulemgt-createobj.sql"
-sed -i "s|DBPWD|$password|g" "$main_path/dbscripts/postgresql/onap-holmes_rulemgt-createobj.sql"
+if [ -d /opt/hrmconfig ]; then
+ cp /opt/hrmconfig/onap-holmes_rulemgt-createobj.sql "$main_path/dbscripts/postgresql/onap-holmes_rulemgt-createobj.sql"
+else
+ sed -i "s|DBNAME|$dbname|g" "$main_path/dbscripts/postgresql/onap-holmes_rulemgt-createobj.sql"
+ sed -i "s|DBUSER|$user|g" "$main_path/dbscripts/postgresql/onap-holmes_rulemgt-createobj.sql"
+ sed -i "s|DBPWD|$password|g" "$main_path/dbscripts/postgresql/onap-holmes_rulemgt-createobj.sql"
+fi
cat $main_path/dbscripts/postgresql/onap-holmes_rulemgt-createobj.sql
echo "dbname=$dbname"
echo "password=$password"
echo "port=$port"
echo "host=$host"
-export PGPASSWORD=$password
-psql -U $user -p $port -h $host -d $dbname -f $main_path/dbscripts/postgresql/onap-holmes_rulemgt-createobj.sql
-psql -U $user -p $port -h $host -d $dbname --command 'select * from aplus_rule;'
+
+if [ -z `env | grep PGPASSWORD` ]; then
+ export PGPASSWORD=$password
+ need_unset=1
+fi
+
+psql -U "'$user'" -p "'$port'" -h "'$host'" -d "'$dbname'" -f $main_path/dbscripts/postgresql/onap-holmes_rulemgt-createobj.sql
+psql -U "'$user'" -p "'$port'" -h "'$host'" -d "'$dbname'" --command 'select * from aplus_rule;'
sql_result=$?
-unset PGPASSWORD
+
+if [ "$need_unset"x == "1"x ]; then
+ unset PGPASSWORD
+fi
+
echo "sql_result=$sql_result"
if [ $sql_result != 0 ] ; then
echo "Failed to initialize the database!"
#curl -X POST -H "Content-Type: application/json" -d ${msg_body} http://${MSB_ADDR}/api/msdiscover/v1/services?is_manual=true
#echo Registered UI to MSB.
+if [ -f "/opt/app/osaaf/local/org.onap.holmes-rule-mgmt.crt" ]; then
+ sed -i "s|/etc/ssl/certs/holmes-frontend-selfsigned.crt|/opt/app/osaaf/local/org.onap.holmes-rule-mgmt.crt|" "/etc/nginx/conf.d/nginx-https.conf"
+ sed -i "s|/etc/ssl/private/holmes-frontend.key|/opt/app/osaaf/local/org.onap.holmes-rule-mgmt.key|" "/etc/nginx/conf.d/nginx-https.conf"
+fi
if [ ${ENABLE_ENCRYPT} = true ]; then
nginx -c /etc/nginx/conf.d/nginx-https.conf
<parent>
<groupId>org.onap.holmes.rule-management</groupId>
<artifactId>holmes-rulemgt-parent</artifactId>
- <version>1.3.1-SNAPSHOT</version>
+ <version>1.3.2-SNAPSHOT</version>
</parent>
<artifactId>holmes-rulemgt</artifactId>
major=1
minor=3
-patch=1
+patch=2
base_version=${major}.${minor}.${patch}