-
Notifications
You must be signed in to change notification settings - Fork 16
/
install-omniengine-user.sh
executable file
·49 lines (39 loc) · 1.13 KB
/
install-omniengine-user.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/sh
set -x
#REPOURL="https://github.com/mastercoin-MSC/omniEngine.git"
#BRANCH="master"
REPOURL=$1
BRANCH=$2
REPODIR="omniEngine"
BTCRPC_CONNECT=$3
BTCRPC_USER=$4
BTCRPC_PASSWORD=$5
BTCRPC_SSL=$6
PGHOST=$7
PGUSER=$8
PGPASSWORD=$9
PGPORT=$10
# Install RPMs, python packages, etc.
cd /vagrant
./install-prerequisites.sh
cd
# Clone and checkout using passed (usually from Vagrant) parameters
git clone --no-checkout $REPOURL $REPODIR
cd $REPODIR
git checkout $BRANCH
mkdir -p logs
mkdir -p ~/.omni
mkdir -p ~/.bitcoin
#cp /vagrant/bitcoin.conf ~/.bitcoin/bitcoin.conf
#cp /vagrant/sql.conf ~/.omni
sed -e "s#^\(rpcuser=\)\(.*\)#\1${BTCRPC_USER}#" \
-e "s#^\(rpcpassword=\)\(.*\)#\1${BTCRPC_PASSWORD}#" \
-e "s#^\(rpcconnect=\)\(.*\)#\1${BTCRPC_CONNECT}#" \
-e "s#^\(rpcssl=\)\(.*\)#\1${BTCRPC_SSL}#" \
/vagrant/bitcoin.conf > ~/.bitcoin/bitcoin.conf
sed -e "s#^\(sqluser=\)\(.*\)#\1${PGUSER}#" \
-e "s#^\(sqlpassword=\)\(.*\)#\1${PGPASSWORD}#" \
-e "s#^\(sqlconnect=\)\(.*\)#\1${PGHOST}#" \
-e "s#^\(sqlport=\)\(.*\)#\1${PGPORT}#" \
/vagrant/sql.conf > ~/.omni/sql.conf
python install/installOmniEngineCronJob.py