Commits

Arthur Clune committed 4f89d44

add missing file; create table in hbbackend db not default

Comments (0)

Files changed (2)

vagrant/puppet/modules/backend/files/opt/honeynet/bin/run-it.sh

+#!/bin/sh
+
+PATH="/opt/glassfish/bin:$PATH"
+export PATH
+
+asadmin --port 9948 deploy target/modules/org.honeynet.hbbackend.virustotal.jar
+asadmin --port 9948 deploy target/modules/org.honeynet.hbbackend.cymruwhois.jar
+asadmin --port 9948 deploy target/modules/org.honeynet.hbbackend.shadowserverdns.jar
+asadmin --port 9948 deploy target/modules/org.honeynet.hbbackend.ipfilter.jar
+asadmin --port 9948 deploy target/modules/org.honeynet.hbbackend.maxmindgeoip.jar
+asadmin --port 9948 deploy target/modules/org.honeynet.hbbackend.submithttp.war
+
+

vagrant/puppet/modules/backend/files/opt/honeynet/bin/setup-db.sh

 
 if [ ! -f /etc/db_installed ]
 then
-    echo "CREATE ROLE hbbackend WITH PASSWORD 'hbbackend' SUPERUSER" | sudo -u postgres psql
-    sudo -u postgres psql < /repo/hbbackend/schema/hbbackend.sql
-    sudo -u postgres psql < /repo/hbbackend/schema/hbbackend_functions.sql
+    echo "create role hbbackend with password 'hbbackend' superuser;" | sudo -u postgres psql
+    echo "create database hbbackend;" | sudo -u postgres psql template1
+    sudo -u postgres psql hbbackend < /repo/hbbackend/schema/hbbackend.sql
+    sudo -u postgres psql hbbackend < /repo/hbbackend/schema/hbbackend_functions.sql
 fi