This commit is contained in:
Chris Kleeschulte 2017-01-21 14:21:09 -05:00
parent 3c27f07291
commit 64c997817f
3 changed files with 32 additions and 0 deletions

11
contrib/restart_bitcore_node.js Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
# helper script to run bwdb and/or restart it
# execute thie script and then simply tail /tmp/bwdb-out
# e.g. ./contrib/restart_bwdb.sh && tail -f /tmp/bwdb-out
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pkill -2 -x bitcore
wait
exec $DIR/../bin/bitcore-node start >> /tmp/bwdb-out 2>&1 &

View File

@ -0,0 +1,20 @@
[Unit]
Description=BWDB
Requires=network.target
[Service]
Type=simple
WorkingDirectory=/usr/opt/bitcore
ExecStart=/usr/bin/bwdb
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=15
User=bitcore
ExecStartPre=/bin/mkdir -p /run/bwdb
ExecStartPre=/bin/chown bitcore:bitcore /run/bwdb
ExecStartPre=/bin/chmod 755 /run/bwdb
PermissionsStartOnly=true
TimeoutStopSec=300
[Install]
WantedBy=multi-user.target

1
contrib/weirdtx.json Normal file

File diff suppressed because one or more lines are too long