mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-05-28 19:42:49 +00:00
Compare commits
2 Commits
pr-1082
...
add-dashco
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
557ef7fde5 | ||
|
|
c141ceb6fe |
9
dash-cli/README.md
Normal file
9
dash-cli/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: dash-cli (alias)
|
||||
homepage: https://webinstall.dev/dashcore
|
||||
tagline: |
|
||||
`dash-cli` (dash daemon) is an alias for `dashcore` (the dash suite)
|
||||
alias: dashcore
|
||||
---
|
||||
|
||||
See [Dash Core](/dashcore).
|
||||
3
dash-cli/install.ps1
Normal file
3
dash-cli/install.ps1
Normal file
@@ -0,0 +1,3 @@
|
||||
echo "'dash-cli@$Env:WEBI_TAG' is an alias for 'dashcore@$Env:WEBI_VERSION'"
|
||||
IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" }
|
||||
curl.exe -fsSL "$Env:WEBI_HOST/dashcore@$Env:WEBI_VERSION" | powershell
|
||||
11
dash-cli/install.sh
Normal file
11
dash-cli/install.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -u
|
||||
|
||||
function __redirect_alias_dashcore() {
|
||||
echo "'dash-cli@${WEBI_TAG:-}' (project) is an alias for 'dashcore@${WEBI_VERSION:-}' (command)"
|
||||
WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"}
|
||||
curl -fsSL "$WEBI_HOST/dashcore@${WEBI_VERSION:-}" | bash
|
||||
}
|
||||
|
||||
__redirect_alias_dashcore
|
||||
3
dash-cli/releases.js
Normal file
3
dash-cli/releases.js
Normal file
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../dashcore/releases.js');
|
||||
9
dash-qt/README.md
Normal file
9
dash-qt/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: dash-qt (alias)
|
||||
homepage: https://webinstall.dev/dashcore
|
||||
tagline: |
|
||||
`dash-qt` (dash daemon) is an alias for `dashcore` (the dash suite)
|
||||
alias: dashcore
|
||||
---
|
||||
|
||||
See [Dash Core](/dashcore).
|
||||
3
dash-qt/install.ps1
Normal file
3
dash-qt/install.ps1
Normal file
@@ -0,0 +1,3 @@
|
||||
echo "'dash-qt@$Env:WEBI_TAG' is an alias for 'dashcore@$Env:WEBI_VERSION'"
|
||||
IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" }
|
||||
curl.exe -fsSL "$Env:WEBI_HOST/dashcore@$Env:WEBI_VERSION" | powershell
|
||||
11
dash-qt/install.sh
Normal file
11
dash-qt/install.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -u
|
||||
|
||||
function __redirect_alias_dashcore() {
|
||||
echo "'dash-qt@${WEBI_TAG:-}' (project) is an alias for 'dashcore@${WEBI_VERSION:-}' (command)"
|
||||
WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"}
|
||||
curl -fsSL "$WEBI_HOST/dashcore@${WEBI_VERSION:-}" | bash
|
||||
}
|
||||
|
||||
__redirect_alias_dashcore
|
||||
3
dash-qt/releases.js
Normal file
3
dash-qt/releases.js
Normal file
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../dashcore/releases.js');
|
||||
9
dash-wallet/README.md
Normal file
9
dash-wallet/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: dash-wallet (alias)
|
||||
homepage: https://webinstall.dev/dashcore
|
||||
tagline: |
|
||||
`dash-wallet` (dash daemon) is an alias for `dashcore` (the dash suite)
|
||||
alias: dashcore
|
||||
---
|
||||
|
||||
See [Dash Core](/dashcore).
|
||||
3
dash-wallet/install.ps1
Normal file
3
dash-wallet/install.ps1
Normal file
@@ -0,0 +1,3 @@
|
||||
echo "'dash-wallet@$Env:WEBI_TAG' is an alias for 'dashcore@$Env:WEBI_VERSION'"
|
||||
IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" }
|
||||
curl.exe -fsSL "$Env:WEBI_HOST/dashcore@$Env:WEBI_VERSION" | powershell
|
||||
11
dash-wallet/install.sh
Normal file
11
dash-wallet/install.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -u
|
||||
|
||||
function __redirect_alias_dashcore() {
|
||||
echo "'dash-wallet@${WEBI_TAG:-}' (project) is an alias for 'dashcore@${WEBI_VERSION:-}' (command)"
|
||||
WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"}
|
||||
curl -fsSL "$WEBI_HOST/dashcore@${WEBI_VERSION:-}" | bash
|
||||
}
|
||||
|
||||
__redirect_alias_dashcore
|
||||
3
dash-wallet/releases.js
Normal file
3
dash-wallet/releases.js
Normal file
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../dashcore/releases.js');
|
||||
9
dash/README.md
Normal file
9
dash/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: Dash (alias)
|
||||
homepage: https://webinstall.dev/dashcore
|
||||
tagline: |
|
||||
`dash` (digital cash) is an alias for `dashcore` (the dash suite)
|
||||
alias: dashcore
|
||||
---
|
||||
|
||||
See [Dash Core](/dashcore).
|
||||
3
dash/install.ps1
Normal file
3
dash/install.ps1
Normal file
@@ -0,0 +1,3 @@
|
||||
echo "'dash@$Env:WEBI_TAG' is an alias for 'dashcore@$Env:WEBI_VERSION'"
|
||||
IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" }
|
||||
curl.exe -fsSL "$Env:WEBI_HOST/dashcore@$Env:WEBI_VERSION" | powershell
|
||||
11
dash/install.sh
Normal file
11
dash/install.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -u
|
||||
|
||||
function __redirect_alias_dashcore() {
|
||||
echo "'dash@${WEBI_TAG:-}' (project) is an alias for 'dashcore@${WEBI_VERSION:-}' (command)"
|
||||
WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"}
|
||||
curl -fsSL "$WEBI_HOST/dashcore@${WEBI_VERSION:-}" | bash
|
||||
}
|
||||
|
||||
__redirect_alias_dashcore
|
||||
3
dash/releases.js
Normal file
3
dash/releases.js
Normal file
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../dashcore/releases.js');
|
||||
40
dashcore/README.md
Normal file
40
dashcore/README.md
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
title: Dash Core
|
||||
homepage: https://github.com/dashpay/dash
|
||||
tagline: |
|
||||
foobar: An example that doesn't exist.
|
||||
---
|
||||
|
||||
To update or switch versions, run `webi dashcore@stable` (or `@v0.17`, `@beta`,
|
||||
etc).
|
||||
|
||||
### Files
|
||||
|
||||
These are the files / directories that are created and/or modified with this
|
||||
install:
|
||||
|
||||
```txt
|
||||
~/.config/envman/PATH.env
|
||||
~/.local/bin/
|
||||
~/.local/opt/dashcore/
|
||||
~/Library/Saved Application State/org.dash.Dash-Qt.savedState
|
||||
~/Library//Preferences/org.dash.Dash-Qt.plist
|
||||
```
|
||||
|
||||
## Cheat Sheet
|
||||
|
||||
> _Dash Core_ is a suite of tools for _Dash_, the international digital
|
||||
> currency.
|
||||
|
||||
The tools include:
|
||||
|
||||
- `dash-qt` the _Desktop Wallet_ for sending and receiving payments
|
||||
- `dash-cli` the _Command Line Wallet_
|
||||
- [`dashd`](/dashd) the ledger and transaction service
|
||||
- `dash-tx` the transaction debugger
|
||||
|
||||
To open the Dash Desktop Wallet:
|
||||
|
||||
```bash
|
||||
dash-qt
|
||||
```
|
||||
56
dashcore/install.ps1
Normal file
56
dashcore/install.ps1
Normal file
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env pwsh
|
||||
|
||||
##################
|
||||
# Install dashcore #
|
||||
##################
|
||||
|
||||
# Every package should define these variables
|
||||
$pkg_cmd_name = "dashd"
|
||||
|
||||
$pkg_dst_cmd = "$Env:USERPROFILE\.local\opt\dashcore\bin\dashd.exe"
|
||||
$pkg_dst_dir = "$Env:USERPROFILE\.local\opt\dashcore"
|
||||
$pkg_dst = "$pkg_dst_cmd"
|
||||
|
||||
$pkg_src_cmd = "$Env:USERPROFILE\.local\opt\dashcore-v$Env:WEBI_VERSION\bin\dashd.exe"
|
||||
$pkg_src_bin = "$Env:USERPROFILE\.local\opt\dashcore-v$Env:WEBI_VERSION\bin"
|
||||
$pkg_src_dir = "$Env:USERPROFILE\.local\opt\dashcore-v$Env:WEBI_VERSION"
|
||||
$pkg_src = "$pkg_src_cmd"
|
||||
|
||||
New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null
|
||||
$pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE"
|
||||
|
||||
# Fetch archive
|
||||
IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE"))
|
||||
{
|
||||
echo "Downloading dashcore from $Env:WEBI_PKG_URL to $pkg_download"
|
||||
& curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part"
|
||||
& move "$pkg_download.part" "$pkg_download"
|
||||
}
|
||||
|
||||
IF (!(Test-Path -Path "$pkg_src_dir"))
|
||||
{
|
||||
echo "Installing dashcore"
|
||||
|
||||
# TODO: create package-specific temp directory
|
||||
# Enter tmp
|
||||
pushd .local\tmp
|
||||
|
||||
# Remove any leftover tmp cruft
|
||||
Remove-Item -Path ".\dashcore*" -Recurse -ErrorAction Ignore
|
||||
|
||||
# Unpack archive file into this temporary directory
|
||||
# Windows BSD-tar handles zip. Imagine that.
|
||||
echo "Unpacking $pkg_download"
|
||||
& tar xf "$pkg_download"
|
||||
|
||||
# Settle unpacked archive into place
|
||||
echo "Install Location: $pkg_src_cmd"
|
||||
Move-Item -Path ".\dashcore*" -Destination "$pkg_src_dir"
|
||||
|
||||
# Exit tmp
|
||||
popd
|
||||
}
|
||||
|
||||
echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'"
|
||||
Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null
|
||||
Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse
|
||||
45
dashcore/install.sh
Normal file
45
dashcore/install.sh
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
# "'pkg_cmd_name' appears unused. Verify it or export it."
|
||||
|
||||
function __init_dashcore() {
|
||||
set -e
|
||||
set -u
|
||||
|
||||
##################
|
||||
# Install dashcore #
|
||||
##################
|
||||
|
||||
# Every package should define these 6 variables
|
||||
pkg_cmd_name="dashd"
|
||||
|
||||
pkg_dst_cmd="$HOME/.local/opt/dashcore/bin/dashd"
|
||||
pkg_dst_dir="$HOME/.local/opt/dashcore"
|
||||
pkg_dst="$pkg_dst_dir"
|
||||
|
||||
pkg_src_cmd="$HOME/.local/opt/dashcore-v$WEBI_VERSION/bin/dashd"
|
||||
pkg_src_dir="$HOME/.local/opt/dashcore-v$WEBI_VERSION"
|
||||
pkg_src="$pkg_src_dir"
|
||||
|
||||
# pkg_install must be defined by every package
|
||||
pkg_install() {
|
||||
# mv ./dashcore-* ~/.local/opt/dashcore-v0.17.0
|
||||
mv ./dashcore-* "${pkg_src_dir}"
|
||||
}
|
||||
|
||||
# pkg_get_current_version is recommended, but not required
|
||||
pkg_get_current_version() {
|
||||
# 'dashd --version' has output in this format:
|
||||
# Dash Core Daemon version v0.17.0.3
|
||||
# This trims it down to just the version number:
|
||||
# 0.17.0
|
||||
dashd --version 2> /dev/null |
|
||||
head -n 1 |
|
||||
cut -d ' ' -f 5 |
|
||||
sed 's:^v::'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
__init_dashcore
|
||||
28
dashcore/releases.js
Normal file
28
dashcore/releases.js
Normal file
@@ -0,0 +1,28 @@
|
||||
'use strict';
|
||||
|
||||
var github = require('../_common/github.js');
|
||||
var owner = 'dashpay';
|
||||
var repo = 'dash';
|
||||
|
||||
module.exports = function (request) {
|
||||
return github(request, owner, repo).then(function (all) {
|
||||
all.releases = all.releases.filter(function (rel) {
|
||||
return !rel.name.endsWith('.asc');
|
||||
});
|
||||
all.releases.forEach(function (rel) {
|
||||
if (rel.name.includes('osx64')) {
|
||||
rel.os = 'macos';
|
||||
}
|
||||
});
|
||||
return all;
|
||||
});
|
||||
};
|
||||
|
||||
if (module === require.main) {
|
||||
module.exports(require('@root/request')).then(function (all) {
|
||||
all = require('../_webi/normalize.js')(all);
|
||||
// just select the first 5 for demonstration
|
||||
all.releases = all.releases.slice(0, 5);
|
||||
console.info(JSON.stringify(all, null, 2));
|
||||
});
|
||||
}
|
||||
116
dashd/README.md
Normal file
116
dashd/README.md
Normal file
@@ -0,0 +1,116 @@
|
||||
---
|
||||
title: dashd (alias)
|
||||
homepage: https://webinstall.dev/dashcore
|
||||
tagline: |
|
||||
`dashd` (dash daemon) is an alias for `dashcore` (the dash suite)
|
||||
alias: dashcore
|
||||
---
|
||||
|
||||
To update or switch versions, run `webi dashd@stable` (or `@v0.17`, `@beta`,
|
||||
etc).
|
||||
|
||||
### Files
|
||||
|
||||
These are the files / directories that are created and/or modified with this
|
||||
install:
|
||||
|
||||
```txt
|
||||
~/.config/envman/PATH.env
|
||||
~/.local/bin/
|
||||
~/.local/opt/dashcore/
|
||||
~/.dashcore/
|
||||
```
|
||||
|
||||
## Cheat Sheet
|
||||
|
||||
> The _Dash Daemon_ joins and listens on the Dash network for payment
|
||||
> transactions.
|
||||
|
||||
You will at least 2GB+ RAM + Swap (or 4GB+ without swap) and 50GB storage (20GB
|
||||
for the ledger + another 20gb for indices) for `dashd` to be able to provide
|
||||
transaction info and RPC services.
|
||||
|
||||
A first run will typically take _several_ hours to sync.
|
||||
|
||||
```bash
|
||||
dashd -- -conf=/home/app/.dashcore/dash.conf -datadir=/mnt/volume_100gb/dashcore/
|
||||
```
|
||||
|
||||
### How to configure dashd
|
||||
|
||||
`~/.dashcore/dash.conf`:
|
||||
|
||||
```txt
|
||||
rpcuser=dash
|
||||
rpcpassword=local321
|
||||
rpcallowip=127.0.0.1/0
|
||||
|
||||
#listen=1
|
||||
server=1
|
||||
#daemon=1
|
||||
|
||||
whitelist=127.0.0.1/0
|
||||
|
||||
# light mode
|
||||
#prune=945
|
||||
txindex=1
|
||||
addressindex=0
|
||||
timestampindex=0
|
||||
spentindex=0
|
||||
|
||||
zmqpubrawtx=tcp://127.0.0.1:28332
|
||||
zmqpubrawtxlock=tcp://127.0.0.1:28332
|
||||
zmqpubhashblock=tcp://127.0.0.1:28332
|
||||
#ip=
|
||||
rpcport=9998
|
||||
uacomment=bitcore
|
||||
#debug=1
|
||||
#testnet=1
|
||||
```
|
||||
|
||||
### How to run dashd as a system service
|
||||
|
||||
```bash
|
||||
sudo env PATH="${PATH}" \
|
||||
serviceman add --system --username "$(whoami)" --path "${PATH}" --name dashd -- \
|
||||
dashd -- -conf=/home/app/.dashcore/dash.conf -datadir=/mnt/volume_100gb/dashcore/
|
||||
```
|
||||
|
||||
### How to enable Swap Space
|
||||
|
||||
`dashd` takes a _lot_ of RAM during the initial sync phase. Once that is
|
||||
completed, it uses _significantly_ less for daily use.
|
||||
|
||||
If you want to save money you can give yourself 4GB+ Swap and although the sync
|
||||
process will run a little slower (but probably not that much), you'll be able to
|
||||
complete it using disk storage.
|
||||
|
||||
To create a swap file:
|
||||
|
||||
```bash
|
||||
sudo fallocate -l 8G /var/swapfile
|
||||
sudo chmod 0600 /var/swapfile
|
||||
sudo mkswap /var/swapfile
|
||||
```
|
||||
|
||||
To temporarily enable swap:
|
||||
|
||||
```bash
|
||||
sudo swapon /var/swapfile
|
||||
```
|
||||
|
||||
To permanently enable swap:
|
||||
|
||||
```bash
|
||||
sudo bash -c 'echo "/var/swapfile none swap sw 0 0" > /etc/fstab'
|
||||
```
|
||||
|
||||
To disable and delete swap:
|
||||
|
||||
```bash
|
||||
sudo swapoff /var/swapfile
|
||||
```
|
||||
|
||||
(don't forget to remove it from `/etc/fstab` as well)
|
||||
|
||||
See [vps-addswap](/vps-addswap) for details.
|
||||
3
dashd/install.ps1
Normal file
3
dashd/install.ps1
Normal file
@@ -0,0 +1,3 @@
|
||||
echo "'dashd@$Env:WEBI_TAG' is an alias for 'dashcore@$Env:WEBI_VERSION'"
|
||||
IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" }
|
||||
curl.exe -fsSL "$Env:WEBI_HOST/dashcore@$Env:WEBI_VERSION" | powershell
|
||||
11
dashd/install.sh
Normal file
11
dashd/install.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -u
|
||||
|
||||
function __redirect_alias_dashcore() {
|
||||
echo "'dashd@${WEBI_TAG:-}' (project) is an alias for 'dashcore@${WEBI_VERSION:-}' (command)"
|
||||
WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"}
|
||||
curl -fsSL "$WEBI_HOST/dashcore@${WEBI_VERSION:-}" | bash
|
||||
}
|
||||
|
||||
__redirect_alias_dashcore
|
||||
3
dashd/releases.js
Normal file
3
dashd/releases.js
Normal file
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../dashcore/releases.js');
|
||||
Reference in New Issue
Block a user