Arthur Clune avatar 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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.