Skip to content

Commit

Permalink
Merge pull request #7 from Emzy/install-fix
Browse files Browse the repository at this point in the history
Add second proxy in nginx. Fix Java lib dependency.
  • Loading branch information
gabernard authored Dec 13, 2022
2 parents 1b556c2 + 922d194 commit 6b8a4ec
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/collectd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ LoadPlugin write_graphite
</MBean>

<Connection>
ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:6969/jmxrmi"
ServiceURL "service:jmx:rmi:///jndi/rmi://127.0.0.1:6969/jmxrmi"
Collect "memory_pool"
Collect "memory"
</Connection>
Expand Down
34 changes: 33 additions & 1 deletion scripts/install_collectd_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ BISQ_MONITOR_REPO_TAG=main
ROOT_USER=root
ROOT_GROUP=root
ROOT_HOME=~root
ROOT_PKG=(nginx collectd openssl)
ROOT_PKG=(curl patch nginx collectd openssl)

SYSTEMD_ENV_HOME=/etc/default

Expand Down Expand Up @@ -56,6 +56,38 @@ sudo -H -i -u "${ROOT_USER}" systemctl daemon-reload
sudo -H -i -u "${ROOT_USER}" systemctl enable nginx.service
sudo -H -i -u "${ROOT_USER}" systemctl enable collectd.service

echo "[*] Symlink libjvm.so for collectd to work"
ln -s /usr/lib/jvm/openjdk-11.0.2/lib/server/libjvm.so /lib/x86_64-linux-gnu/libjvm.so || true

echo "[*] Add monitor parameter to bisq seednode service"
( patch -u /etc/default/bisq.env || true ) <<EOF
--- bisq.env.old 2022-12-07 12:07:14.481493232 +0000
+++ /etc/default/bisq.env 2022-12-07 12:13:58.370281467 +0000
@@ -40,3 +40,6 @@
# set to true for BSQ markets
BISQ_DUMP_STATISTICS=false
+
+# Reporting Server
+BISQ_REPORTINGSERVERURL=http://localhost:13003
EOF

( patch -u /etc/systemd/system/bisq.service || true ) <<EOF
--- bisq.service.old 2022-12-07 12:07:00.653481418 +0000
+++ /etc/systemd/system/bisq.service 2022-12-07 12:07:56.417573388 +0000
@@ -27,6 +27,7 @@
--rpcPassword=\${BITCOIN_RPC_PASS} \\
--dumpBlockchainData=\${BISQ_DUMP_BLOCKCHAIN} \\
--dumpStatistics=\${BISQ_DUMP_STATISTICS} \\
+ --seedNodeReportingServerUrl=\${BISQ_REPORTINGSERVERURL} \\
--torControlPort=9051
ExecStop=/bin/kill \${MAINPID}
EOF

sudo -H -i -u "${ROOT_USER}" systemctl daemon-reload


echo "[*] Restarting services"
set +e
service bisq status >/dev/null 2>&1
Expand Down
10 changes: 10 additions & 0 deletions scripts/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,14 @@ stream {

proxy_ssl_session_reuse on;
}
server {
listen 127.0.0.1:13003;
proxy_pass monitor.bisq.network:13002;
proxy_ssl on;

proxy_ssl_certificate /etc/nginx/cert.crt;
proxy_ssl_certificate_key /etc/nginx/cert.key;

proxy_ssl_session_reuse on;
}
}

0 comments on commit 6b8a4ec

Please sign in to comment.