Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dashcore-utils): use webi (not WEBI_HOST), correct filenames, other minor fix #803

Merged
merged 6 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions dashcore-utils/dash.example.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# for exposing RPCs, building APIs
txindex=1
addressindex=1
timestampindex=1
spentindex=1
# listen as server (explicit default)
listen=1
# because its already run as a service (systemd, openrc)
daemon=0
# for evonodes
#server=1

[main]
rpcuser=RPCUSER_MAIN
Expand Down
9 changes: 5 additions & 4 deletions dashcore-utils/dashd-hd-service-install
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,24 @@ fn_usage() { (
); }

fn_datadir_help() { (
my_vol="${1:-}"
my_vol="${1}"
my_user="$(
id -n -u
)"
my_group="$(
id -n -g
)"

my_mount="$(dirname "${my_vol}")"
echo >&2 ""
echo >&2 "ERROR"
echo >&2 " '${my_vol}' is not writable"
echo >&2 ""
echo >&2 "SOLUTION"
echo >&2 " 1. Mount a large (50gb+) volume"
echo >&2 ""
echo >&2 " sudo mkdir -p /mnt/EXAMPLE"
echo >&2 " sudo mount /dev/sdx1 /mnt/EXAMPLE"
echo >&2 " sudo mkdir -p ${my_mount}"
echo >&2 " sudo mount /dev/sdx1 ${my_mount}"
echo >&2 ""
echo >&2 " 2. Create a 'dashcore' inside of it"
echo >&2 ""
Expand Down Expand Up @@ -111,7 +112,7 @@ fn_srv_install() { (
echo "Installing 'serviceman'..."
echo ""
{
curl -fsSL "${WEBI_HOST}/serviceman" | sh
"$HOME/.local/bin/webi" serviceman
} > /dev/null

# shellcheck disable=SC1090
Expand Down
21 changes: 14 additions & 7 deletions dashcore-utils/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,38 @@ set -u
__install_dashcore_utils() {
webi_download \
"$WEBI_HOST/packages/dashcore-utils/dash-qt-hd" \
"$HOME/.local/bin/dash-qt-hd"
"$HOME/.local/bin/dash-qt-hd" \
"dash-qt-hd"
chmod a+x "$HOME/.local/bin/dash-qt-hd"

webi_download \
"$WEBI_HOST/packages/dashcore-utils/dash-qt-testnet" \
"$HOME/.local/bin/dash-qt-testnet"
"$HOME/.local/bin/dash-qt-testnet" \
"dash-qt-testnet"
chmod a+x "$HOME/.local/bin/dash-qt-testnet"

webi_download \
"$WEBI_HOST/packages/dashcore-utils/dashd-hd" \
"$HOME/.local/bin/dashd-hd"
"$HOME/.local/bin/dashd-hd" \
"dashd-hd"
chmod a+x "$HOME/.local/bin/dashd-hd"

webi_download \
"$WEBI_HOST/packages/dashcore-utils/dashd-testnet" \
"$HOME/.local/bin/dashd-testnet"
"$HOME/.local/bin/dashd-testnet" \
"dashd-testnet"
chmod a+x "$HOME/.local/bin/dashd-testnet"

webi_download \
"$WEBI_HOST/packages/dashcore-utils/dashd-hd-service-install" \
"$HOME/.local/bin/dashd-hd-service-install"
"$HOME/.local/bin/dashd-hd-service-install" \
"dashd-hd-service-install"
chmod a+x "$HOME/.local/bin/dashd-hd-service-install"

webi_download \
"$WEBI_HOST/packages/dashcore-utils/dashd-testnet-service-install" \
"$HOME/.local/bin/dashd-testnet-service-install"
"$HOME/.local/bin/dashd-testnet-service-install" \
"dashd-testnet-service-install"
chmod a+x "$HOME/.local/bin/dashd-testnet-service-install"

if ! test -e "${HOME}/.dashcore"; then
Expand All @@ -44,7 +50,8 @@ __install_dashcore_utils() {

webi_download \
"$WEBI_HOST/packages/dashcore-utils/dash.example.conf" \
"$HOME/.dashcore/dash.example.conf"
"$HOME/.dashcore/dash.example.conf" \
"dash.example.conf"

if ! grep -q rpcuser ~/.dashcore/dash.conf; then
cat ~/.dashcore/dash.example.conf >> ~/.dashcore/dash.conf
Expand Down
2 changes: 1 addition & 1 deletion dashd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ install:
~/.config/envman/PATH.env
~/.dashcore/dash.conf
~/.dashcore/wallets/
~/.local/bin/bin/dashd-hd-service-install
~/.local/bin/dashd-hd-service-install
~/.local/opt/dashcore/
/mnt/<BLK_VOL>/dashcore/
```
Expand Down
2 changes: 1 addition & 1 deletion go-essentials/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
set -u

__run_go_essentials() {
if ! command -v go 2> /dev/null; then
if ! command -v go > /dev/null; then
"$HOME/.local/bin/webi" "go@${WEBI_TAG}"
fi

Expand Down