|
|
|
@ -191,9 +191,9 @@ case $OS in
|
|
|
|
|
TOR_CONFIGURATION=/etc/tor/torrc
|
|
|
|
|
TOR_RESOURCES=/var/lib/tor
|
|
|
|
|
TOR_PKG=tor
|
|
|
|
|
TOR_USER=tor-debian
|
|
|
|
|
TOR_GROUP=tor-debian
|
|
|
|
|
CERTBOT_PKG=python-certbot
|
|
|
|
|
TOR_USER=debian-tor
|
|
|
|
|
TOR_GROUP=debian-tor
|
|
|
|
|
CERTBOT_PKG=python3-certbot-nginx
|
|
|
|
|
NGINX_CONFIGURATION=/etc/nginx/nginx.conf
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
@ -320,12 +320,12 @@ LIQUIDTESTNET_ASSET_REGISTRY_DB_NAME=asset_registry_testnet_db
|
|
|
|
|
|
|
|
|
|
# packages needed for mempool ecosystem
|
|
|
|
|
DEBIAN_PKG=()
|
|
|
|
|
DEBIAN_PKG+=(zsh vim curl screen openssl python3 dialog)
|
|
|
|
|
DEBIAN_PKG+=(zsh vim curl screen openssl python3 dialog cron)
|
|
|
|
|
DEBIAN_PKG+=(build-essential git git-lfs clang cmake jq)
|
|
|
|
|
DEBIAN_PKG+=(autotools-dev autoconf automake pkg-config bsdmainutils)
|
|
|
|
|
DEBIAN_PKG+=(libevent-dev libdb-dev libssl-dev libtool-dev autotools-dev)
|
|
|
|
|
DEBIAN_PKG+=(libevent-dev libdb-dev libssl-dev libtool autotools-dev)
|
|
|
|
|
DEBIAN_PKG+=(libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev)
|
|
|
|
|
DEBIAN_PKG+=(nodejs npm mariadb-server nginx-core python-certbot-nginx rsync ufw)
|
|
|
|
|
DEBIAN_PKG+=(nodejs npm mariadb-server nginx-core python3-certbot-nginx rsync ufw)
|
|
|
|
|
|
|
|
|
|
# packages needed for mempool ecosystem
|
|
|
|
|
FREEBSD_PKG=()
|
|
|
|
@ -555,7 +555,6 @@ zfsCreateFilesystems()
|
|
|
|
|
ext4CreateDir()
|
|
|
|
|
{
|
|
|
|
|
mkdir -p "/backup" "${ELEMENTS_HOME}" "${BITCOIN_HOME}" "${MINFEE_HOME}" "${ELECTRS_HOME}" "${MEMPOOL_HOME}" "${MYSQL_HOME}" "${BITCOIN_ELECTRS_HOME}" "${ELEMENTS_HOME}/liquidv1" "${ELEMENTS_ELECTRS_HOME}"
|
|
|
|
|
exit
|
|
|
|
|
# Bitcoin Mainnet
|
|
|
|
|
if [ "${BITCOIN_MAINNET_ENABLE}" = ON ];then
|
|
|
|
|
for folder in chainstate indexes blocks
|
|
|
|
@ -977,10 +976,10 @@ if [ "${BITCOIN_INSTALL}" = ON ];then
|
|
|
|
|
osSudo "${ROOT_USER}" install -c -o "${MINFEE_USER}" -g "${MINFEE_GROUP}" -m 644 "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/bitcoin.minfee.conf" "${MINFEE_HOME}/bitcoin.conf"
|
|
|
|
|
|
|
|
|
|
echo "[*] Installing Bitcoin RPC credentials"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_RPC_USER__/${BITCOIN_RPC_USER}/" "${BITCOIN_HOME}/bitcoin.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_RPC_PASS__/${BITCOIN_RPC_PASS}/" "${BITCOIN_HOME}/bitcoin.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_RPC_USER__/${BITCOIN_RPC_USER}/" "${MINFEE_HOME}/bitcoin.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_RPC_PASS__/${BITCOIN_RPC_PASS}/" "${MINFEE_HOME}/bitcoin.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_RPC_USER__/${BITCOIN_RPC_USER}/" "${BITCOIN_HOME}/bitcoin.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_RPC_PASS__/${BITCOIN_RPC_PASS}/" "${BITCOIN_HOME}/bitcoin.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_RPC_USER__/${BITCOIN_RPC_USER}/" "${MINFEE_HOME}/bitcoin.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_RPC_PASS__/${BITCOIN_RPC_PASS}/" "${MINFEE_HOME}/bitcoin.conf"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
#########################
|
|
|
|
@ -1019,10 +1018,10 @@ if [ "${ELEMENTS_INSTALL}" = ON ];then
|
|
|
|
|
osSudo "${ROOT_USER}" install -c -o "${ELEMENTS_USER}" -g "${ELEMENTS_GROUP}" -m 644 "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/elements.conf" "${ELEMENTS_HOME}/elements.conf"
|
|
|
|
|
|
|
|
|
|
echo "[*] Configuring Elements Liquid RPC credentials in elements.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_RPC_USER__/${BITCOIN_RPC_USER}/" "${ELEMENTS_HOME}/elements.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_RPC_PASS__/${BITCOIN_RPC_PASS}/" "${ELEMENTS_HOME}/elements.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__ELEMENTS_RPC_USER__/${ELEMENTS_RPC_USER}/" "${ELEMENTS_HOME}/elements.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__ELEMENTS_RPC_PASS__/${ELEMENTS_RPC_PASS}/" "${ELEMENTS_HOME}/elements.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_RPC_USER__/${BITCOIN_RPC_USER}/" "${ELEMENTS_HOME}/elements.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_RPC_PASS__/${BITCOIN_RPC_PASS}/" "${ELEMENTS_HOME}/elements.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__ELEMENTS_RPC_USER__/${ELEMENTS_RPC_USER}/" "${ELEMENTS_HOME}/elements.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__ELEMENTS_RPC_PASS__/${ELEMENTS_RPC_PASS}/" "${ELEMENTS_HOME}/elements.conf"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
###################################
|
|
|
|
@ -1056,10 +1055,16 @@ esac
|
|
|
|
|
echo "[*] Building Bitcoin Electrs release binary"
|
|
|
|
|
osSudo "${BITCOIN_USER}" sh -c "cd ${BITCOIN_ELECTRS_HOME} && cargo run --release --bin electrs -- --version" || true
|
|
|
|
|
|
|
|
|
|
echo "[*] Patching Bitcoin Electrs code for FreeBSD"
|
|
|
|
|
osSudo "${BITCOIN_USER}" sh -c "cd \"${BITCOIN_HOME}/.cargo/registry/src/github.com-1ecc6299db9ec823/sysconf-0.3.4\" && patch -p1 < \"${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/freebsd/sysconf.patch\""
|
|
|
|
|
osSudo "${BITCOIN_USER}" sh -c "cd \"${BITCOIN_ELECTRS_HOME}/src/new_index/\" && sed -i .bak -e s/Snappy/None/ db.rs && rm db.rs.bak"
|
|
|
|
|
osSudo "${BITCOIN_USER}" sh -c "cd \"${BITCOIN_ELECTRS_HOME}/src/bin/\" && sed -i .bak -e 's/from_secs(5)/from_secs(1)/' electrs.rs && rm electrs.rs.bak"
|
|
|
|
|
case $OS in
|
|
|
|
|
FreeBSD)
|
|
|
|
|
echo "[*] Patching Bitcoin Electrs code for FreeBSD"
|
|
|
|
|
osSudo "${BITCOIN_USER}" sh -c "cd \"${BITCOIN_HOME}/.cargo/registry/src/github.com-1ecc6299db9ec823/sysconf-0.3.4\" && patch -p1 < \"${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/freebsd/sysconf.patch\""
|
|
|
|
|
osSudo "${BITCOIN_USER}" sh -c "cd \"${BITCOIN_ELECTRS_HOME}/src/new_index/\" && sed -i.bak -e s/Snappy/None/ db.rs && rm db.rs.bak"
|
|
|
|
|
osSudo "${BITCOIN_USER}" sh -c "cd \"${BITCOIN_ELECTRS_HOME}/src/bin/\" && sed -i.bak -e 's/from_secs(5)/from_secs(1)/' electrs.rs && rm electrs.rs.bak"
|
|
|
|
|
;;
|
|
|
|
|
Debian)
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
echo "[*] Building Bitcoin Electrs release binary"
|
|
|
|
|
osSudo "${BITCOIN_USER}" sh -c "cd ${BITCOIN_ELECTRS_HOME} && cargo run --release --bin electrs -- --version"
|
|
|
|
@ -1102,8 +1107,14 @@ esac
|
|
|
|
|
echo "[*] Building Liquid Electrs release binary"
|
|
|
|
|
osSudo "${ELEMENTS_USER}" sh -c "cd ${ELEMENTS_ELECTRS_HOME} && cargo run --release --features liquid --bin electrs -- --network liquid --version" || true
|
|
|
|
|
|
|
|
|
|
echo "[*] Patching Liquid Electrs code for FreeBSD"
|
|
|
|
|
osSudo "${ELEMENTS_USER}" sh -c "cd \"${ELEMENTS_HOME}/.cargo/registry/src/github.com-1ecc6299db9ec823/sysconf-0.3.4\" && patch -p1 < \"${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/freebsd/sysconf.patch\""
|
|
|
|
|
case $OS in
|
|
|
|
|
FreeBSD)
|
|
|
|
|
echo "[*] Patching Liquid Electrs code for FreeBSD"
|
|
|
|
|
osSudo "${ELEMENTS_USER}" sh -c "cd \"${ELEMENTS_HOME}/.cargo/registry/src/github.com-1ecc6299db9ec823/sysconf-0.3.4\" && patch -p1 < \"${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/freebsd/sysconf.patch\""
|
|
|
|
|
;;
|
|
|
|
|
Debian)
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
echo "[*] Building Liquid Electrs release binary"
|
|
|
|
|
osSudo "${ELEMENTS_USER}" sh -c "cd ${ELEMENTS_ELECTRS_HOME} && cargo run --release --features liquid --bin electrs -- --network liquid --version" || true
|
|
|
|
@ -1135,8 +1146,8 @@ if [ "${BISQ_INSTALL}" = ON ];then
|
|
|
|
|
echo "[*] Cloning Bisq top-level repo"
|
|
|
|
|
osSudo "${BISQ_USER}" git clone --branch "${BISQ_REPO_BRANCH}" "${BISQ_REPO_URL}" "${BISQ_HOME}/${BISQ_REPO_NAME}"
|
|
|
|
|
|
|
|
|
|
echo "[*] Installing OpenJDK 10.0.2 from Bisq install_java.sh script"
|
|
|
|
|
osSudo "${ROOT_USER}" "${BISQ_HOME}/${BISQ_REPO_NAME}/scripts/install_java.sh"
|
|
|
|
|
echo "[*] Installing OpenJDK from Bisq install_java_linux.sh script"
|
|
|
|
|
osSudo "${ROOT_USER}" "${BISQ_HOME}/${BISQ_REPO_NAME}/scripts/install_java_linux.sh"
|
|
|
|
|
|
|
|
|
|
echo "[*] Checking out Bisq ${BISQ_LATEST_RELEASE}"
|
|
|
|
|
osSudo "${BISQ_USER}" sh -c "cd ${BISQ_HOME}/${BISQ_REPO_NAME} && git checkout ${BISQ_LATEST_RELEASE}"
|
|
|
|
@ -1159,26 +1170,26 @@ if [ "${BISQ_INSTALL}" = ON ];then
|
|
|
|
|
|
|
|
|
|
Debian)
|
|
|
|
|
osSudo "${ROOT_USER}" install -c -o "${ROOT_USER}" -g "${ROOT_GROUP}" -m 644 "${BISQ_HOME}/${BISQ_REPO_NAME}/seednode/bisq.service" "${DEBIAN_SERVICE_HOME}/bisq.service"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/#Requires=bitcoin.service/Requires=bitcoin.service/" "${DEBIAN_SERVICE_HOME}/bisq.service"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/#BindsTo=bitcoin.service/BindsTo=bitcoin.service/" "${DEBIAN_SERVICE_HOME}/bisq.service"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BISQ_REPO_NAME__/${BISQ_REPO_NAME}/" "${DEBIAN_SERVICE_HOME}/bisq.service"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s!__BISQ_HOME__!${BISQ_HOME}!" "${DEBIAN_SERVICE_HOME}/bisq.service"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/#Requires=bitcoin.service/Requires=bitcoin.service/" "${DEBIAN_SERVICE_HOME}/bisq.service"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/#BindsTo=bitcoin.service/BindsTo=bitcoin.service/" "${DEBIAN_SERVICE_HOME}/bisq.service"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BISQ_REPO_NAME__/${BISQ_REPO_NAME}/" "${DEBIAN_SERVICE_HOME}/bisq.service"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s!__BISQ_HOME__!${BISQ_HOME}!" "${DEBIAN_SERVICE_HOME}/bisq.service"
|
|
|
|
|
|
|
|
|
|
echo "[*] Installing Bisq environment file"
|
|
|
|
|
osSudo "${ROOT_USER}" install -c -o "${ROOT_USER}" -g "${ROOT_GROUP}" -m 644 "${BISQ_HOME}/${BISQ_REPO_NAME}/seednode/bisq.env" "${DEBIAN_ENV_HOME}/bisq.env"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s!__BISQ_APP_NAME__!${BISQ_APP_NAME}!" "${DEBIAN_ENV_HOME}/bisq.env"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s!__BISQ_HOME__!${BISQ_HOME}!" "${DEBIAN_ENV_HOME}/bisq.env"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s!__BISQ_APP_NAME__!${BISQ_APP_NAME}!" "${DEBIAN_ENV_HOME}/bisq.env"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s!__BISQ_HOME__!${BISQ_HOME}!" "${DEBIAN_ENV_HOME}/bisq.env"
|
|
|
|
|
|
|
|
|
|
echo "[*] Configuring Bisq environment file with Bitcoin RPC credentials"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_P2P_HOST__/${BITCOIN_MAINNET_P2P_HOST}/" "${DEBIAN_ENV_HOME}/bisq.env"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_P2P_PORT__/${BITCOIN_MAINNET_P2P_PORT}/" "${DEBIAN_ENV_HOME}/bisq.env"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_RPC_HOST__/${BITCOIN_MAINNET_RPC_HOST}/" "${DEBIAN_ENV_HOME}/bisq.env"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_RPC_PORT__/${BITCOIN_MAINNET_RPC_PORT}/" "${DEBIAN_ENV_HOME}/bisq.env"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_RPC_USER__/${BITCOIN_RPC_USER}/" "${DEBIAN_ENV_HOME}/bisq.env"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_RPC_PASS__/${BITCOIN_RPC_PASS}/" "${DEBIAN_ENV_HOME}/bisq.env"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_P2P_HOST__/${BITCOIN_MAINNET_P2P_HOST}/" "${DEBIAN_ENV_HOME}/bisq.env"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_P2P_PORT__/${BITCOIN_MAINNET_P2P_PORT}/" "${DEBIAN_ENV_HOME}/bisq.env"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_RPC_HOST__/${BITCOIN_MAINNET_RPC_HOST}/" "${DEBIAN_ENV_HOME}/bisq.env"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_RPC_PORT__/${BITCOIN_MAINNET_RPC_PORT}/" "${DEBIAN_ENV_HOME}/bisq.env"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_RPC_USER__/${BITCOIN_RPC_USER}/" "${DEBIAN_ENV_HOME}/bisq.env"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_RPC_PASS__/${BITCOIN_RPC_PASS}/" "${DEBIAN_ENV_HOME}/bisq.env"
|
|
|
|
|
|
|
|
|
|
#echo "[*] Updating Bitcoin configuration for Bisq"
|
|
|
|
|
#osSudo "${ROOT_USER}" sed -i .orig "s/#blocknotify/blocknotify/" "${BITCOIN_HOME}/bitcoin.conf"
|
|
|
|
|
#osSudo "${ROOT_USER}" sed -i.orig "s/#blocknotify/blocknotify/" "${BITCOIN_HOME}/bitcoin.conf"
|
|
|
|
|
#osSudo "${BITCOIN_USER}" install -c -o "${BITCOIN_USER}" -g "${BITCOIN_GROUP}" -m 755 "${BISQ_HOME}/${BISQ_REPO_NAME}/seednode/blocknotify.sh" "${BITCOIN_HOME}/blocknotify.sh"
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
@ -1198,7 +1209,61 @@ if [ "${BITCOIN_MAINNET_ENABLE}" = ON ];then
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
Debian)
|
|
|
|
|
osSudo "${ROOT_USER}" install -c -o "${ROOT_USER}" -g "${ROOT_GROUP}" -m 644 "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/bitcoin-mainnet.service" "${DEBIAN_SERVICE_HOME}"
|
|
|
|
|
osSudo "${ROOT_USER}" install -c -o "${ROOT_USER}" -g "${ROOT_GROUP}" -m 644 "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/linux/bitcoin.service" "${DEBIAN_SERVICE_HOME}"
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
################################
|
|
|
|
|
# Bitcoin instance for Testnet #
|
|
|
|
|
################################
|
|
|
|
|
|
|
|
|
|
if [ "${BITCOIN_TESTNET_ENABLE}" = ON ];then
|
|
|
|
|
echo "[*] Installing Bitcoin Testnet service"
|
|
|
|
|
case $OS in
|
|
|
|
|
|
|
|
|
|
FreeBSD)
|
|
|
|
|
echo "[*] FIXME: Bitcoin Testnet service must be installed manually on FreeBSD"
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
Debian)
|
|
|
|
|
osSudo "${ROOT_USER}" install -c -o "${ROOT_USER}" -g "${ROOT_GROUP}" -m 644 "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/linux/bitcoin-testnet.service" "${DEBIAN_SERVICE_HOME}"
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
###############################
|
|
|
|
|
# Bitcoin instance for Signet #
|
|
|
|
|
###############################
|
|
|
|
|
|
|
|
|
|
if [ "${BITCOIN_SIGNET_ENABLE}" = ON ];then
|
|
|
|
|
echo "[*] Installing Bitcoin Signet service"
|
|
|
|
|
case $OS in
|
|
|
|
|
|
|
|
|
|
FreeBSD)
|
|
|
|
|
echo "[*] FIXME: Bitcoin Signet service must be installed manually on FreeBSD"
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
Debian)
|
|
|
|
|
osSudo "${ROOT_USER}" install -c -o "${ROOT_USER}" -g "${ROOT_GROUP}" -m 644 "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/linux/bitcoin-signet.service" "${DEBIAN_SERVICE_HOME}"
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
###############################
|
|
|
|
|
# Bitcoin instance for Liquid #
|
|
|
|
|
###############################
|
|
|
|
|
|
|
|
|
|
if [ "${ELEMENTS_LIQUID_ENABLE}" = ON ];then
|
|
|
|
|
echo "[*] Installing Bitcoin Liquid service"
|
|
|
|
|
case $OS in
|
|
|
|
|
|
|
|
|
|
FreeBSD)
|
|
|
|
|
echo "[*] FIXME: Bitcoin Liquid service must be installed manually on FreeBSD"
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
Debian)
|
|
|
|
|
osSudo "${ROOT_USER}" install -c -o "${ROOT_USER}" -g "${ROOT_GROUP}" -m 644 "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/linux/liquid.service" "${DEBIAN_SERVICE_HOME}"
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
fi
|
|
|
|
@ -1217,9 +1282,9 @@ if [ "${BITCOIN_MAINNET_ENABLE}" = ON ];then
|
|
|
|
|
osSudo "${ROOT_USER}" crontab -u "${MINFEE_USER}" "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/minfee.crontab"
|
|
|
|
|
|
|
|
|
|
echo "[*] Configuring Bitcoin Mainnet RPC credentials in electrs start script"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_RPC_USER__/${BITCOIN_RPC_USER}/" "${BITCOIN_ELECTRS_HOME}/electrs-start-mainnet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_RPC_PASS__/${BITCOIN_RPC_PASS}/" "${BITCOIN_ELECTRS_HOME}/electrs-start-mainnet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s!__ELECTRS_DATA_ROOT__!${ELECTRS_DATA_ROOT}!" "${BITCOIN_ELECTRS_HOME}/electrs-start-mainnet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_RPC_USER__/${BITCOIN_RPC_USER}/" "${BITCOIN_ELECTRS_HOME}/electrs-start-mainnet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_RPC_PASS__/${BITCOIN_RPC_PASS}/" "${BITCOIN_ELECTRS_HOME}/electrs-start-mainnet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s!__ELECTRS_DATA_ROOT__!${ELECTRS_DATA_ROOT}!" "${BITCOIN_ELECTRS_HOME}/electrs-start-mainnet"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
########################################
|
|
|
|
@ -1231,9 +1296,9 @@ if [ "${BITCOIN_TESTNET_ENABLE}" = ON ];then
|
|
|
|
|
osSudo "${ROOT_USER}" install -c -o "${BITCOIN_USER}" -g "${BITCOIN_GROUP}" -m 755 "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/electrs-start-testnet" "${BITCOIN_ELECTRS_HOME}"
|
|
|
|
|
|
|
|
|
|
echo "[*] Configuring Bitcoin Testnet RPC credentials in electrs start script"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_RPC_USER__/${BITCOIN_RPC_USER}/" "${BITCOIN_ELECTRS_HOME}/electrs-start-testnet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_RPC_PASS__/${BITCOIN_RPC_PASS}/" "${BITCOIN_ELECTRS_HOME}/electrs-start-testnet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s!__ELECTRS_DATA_ROOT__!${ELECTRS_DATA_ROOT}!" "${BITCOIN_ELECTRS_HOME}/electrs-start-testnet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_RPC_USER__/${BITCOIN_RPC_USER}/" "${BITCOIN_ELECTRS_HOME}/electrs-start-testnet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_RPC_PASS__/${BITCOIN_RPC_PASS}/" "${BITCOIN_ELECTRS_HOME}/electrs-start-testnet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s!__ELECTRS_DATA_ROOT__!${ELECTRS_DATA_ROOT}!" "${BITCOIN_ELECTRS_HOME}/electrs-start-testnet"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
@ -1245,9 +1310,9 @@ if [ "${BITCOIN_SIGNET_ENABLE}" = ON ];then
|
|
|
|
|
osSudo "${ROOT_USER}" install -c -o "${BITCOIN_USER}" -g "${BITCOIN_GROUP}" -m 755 "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/electrs-start-signet" "${BITCOIN_ELECTRS_HOME}"
|
|
|
|
|
|
|
|
|
|
echo "[*] Configuring Bitcoin Signet RPC credentials in electrs start script"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_RPC_USER__/${BITCOIN_RPC_USER}/" "${BITCOIN_ELECTRS_HOME}/electrs-start-signet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_RPC_PASS__/${BITCOIN_RPC_PASS}/" "${BITCOIN_ELECTRS_HOME}/electrs-start-signet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s!__ELECTRS_DATA_ROOT__!${ELECTRS_DATA_ROOT}!" "${BITCOIN_ELECTRS_HOME}/electrs-start-signet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_RPC_USER__/${BITCOIN_RPC_USER}/" "${BITCOIN_ELECTRS_HOME}/electrs-start-signet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_RPC_PASS__/${BITCOIN_RPC_PASS}/" "${BITCOIN_ELECTRS_HOME}/electrs-start-signet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s!__ELECTRS_DATA_ROOT__!${ELECTRS_DATA_ROOT}!" "${BITCOIN_ELECTRS_HOME}/electrs-start-signet"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
########################################
|
|
|
|
@ -1263,9 +1328,9 @@ if [ "${ELEMENTS_LIQUID_ENABLE}" = ON ];then
|
|
|
|
|
osSudo "${ROOT_USER}" crontab -u "${ELEMENTS_USER}" "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/elements.crontab"
|
|
|
|
|
|
|
|
|
|
echo "[*] Configuring Elements Liquid RPC credentials in electrs start script"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__ELEMENTS_RPC_USER__/${ELEMENTS_RPC_USER}/" "${ELEMENTS_ELECTRS_HOME}/electrs-start-liquid"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__ELEMENTS_RPC_PASS__/${ELEMENTS_RPC_PASS}/" "${ELEMENTS_ELECTRS_HOME}/electrs-start-liquid"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s!__ELECTRS_DATA_ROOT__!${ELECTRS_DATA_ROOT}!" "${ELEMENTS_ELECTRS_HOME}/electrs-start-liquid"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__ELEMENTS_RPC_USER__/${ELEMENTS_RPC_USER}/" "${ELEMENTS_ELECTRS_HOME}/electrs-start-liquid"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__ELEMENTS_RPC_PASS__/${ELEMENTS_RPC_PASS}/" "${ELEMENTS_ELECTRS_HOME}/electrs-start-liquid"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s!__ELECTRS_DATA_ROOT__!${ELECTRS_DATA_ROOT}!" "${ELEMENTS_ELECTRS_HOME}/electrs-start-liquid"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
################################################
|
|
|
|
@ -1277,15 +1342,15 @@ if [ "${ELEMENTS_LIQUIDTESTNET_ENABLE}" = ON ];then
|
|
|
|
|
osSudo "${ROOT_USER}" install -c -o "${ELEMENTS_USER}" -g "${ELEMENTS_GROUP}" -m 755 "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/electrs-start-liquidtestnet" "${ELEMENTS_ELECTRS_HOME}"
|
|
|
|
|
|
|
|
|
|
echo "[*] Installing Elements Liquid Testnet RPC credentials"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_RPC_USER__/${BITCOIN_RPC_USER}/" "${ELEMENTS_HOME}/elements.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__BITCOIN_RPC_PASS__/${BITCOIN_RPC_PASS}/" "${ELEMENTS_HOME}/elements.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__ELEMENTS_RPC_USER__/${ELEMENTS_RPC_USER}/" "${ELEMENTS_HOME}/elements.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__ELEMENTS_RPC_PASS__/${ELEMENTS_RPC_PASS}/" "${ELEMENTS_HOME}/elements.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_RPC_USER__/${BITCOIN_RPC_USER}/" "${ELEMENTS_HOME}/elements.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__BITCOIN_RPC_PASS__/${BITCOIN_RPC_PASS}/" "${ELEMENTS_HOME}/elements.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__ELEMENTS_RPC_USER__/${ELEMENTS_RPC_USER}/" "${ELEMENTS_HOME}/elements.conf"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__ELEMENTS_RPC_PASS__/${ELEMENTS_RPC_PASS}/" "${ELEMENTS_HOME}/elements.conf"
|
|
|
|
|
|
|
|
|
|
echo "[*] Configuring Elements LiquidTestnet RPC credentials in electrs start script"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__ELEMENTS_RPC_USER__/${ELEMENTS_RPC_USER}/" "${ELEMENTS_ELECTRS_HOME}/electrs-start-liquidtestnet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s/__ELEMENTS_RPC_PASS__/${ELEMENTS_RPC_PASS}/" "${ELEMENTS_ELECTRS_HOME}/electrs-start-liquidtestnet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i .orig "s!__ELECTRS_DATA_ROOT__!${ELECTRS_DATA_ROOT}!" "${ELEMENTS_ELECTRS_HOME}/electrs-start-liquidtestnet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__ELEMENTS_RPC_USER__/${ELEMENTS_RPC_USER}/" "${ELEMENTS_ELECTRS_HOME}/electrs-start-liquidtestnet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s/__ELEMENTS_RPC_PASS__/${ELEMENTS_RPC_PASS}/" "${ELEMENTS_ELECTRS_HOME}/electrs-start-liquidtestnet"
|
|
|
|
|
osSudo "${ROOT_USER}" sed -i.orig "s!__ELECTRS_DATA_ROOT__!${ELECTRS_DATA_ROOT}!" "${ELEMENTS_ELECTRS_HOME}/electrs-start-liquidtestnet"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
#####################################
|
|
|
|
@ -1394,7 +1459,7 @@ case $OS in
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
Debian)
|
|
|
|
|
osSudo "${ROOT_USER}" install -c -o "${ROOT_USER}" -g "${ROOT_GROUP}" -m 644 "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/nginx.conf" "${NGINX_CONFIGURATION}"
|
|
|
|
|
osSudo "${ROOT_USER}" install -c -o "${ROOT_USER}" -g "${ROOT_GROUP}" -m 644 "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/nginx/nginx.conf" "${NGINX_CONFIGURATION}"
|
|
|
|
|
#echo "[*] Restarting Nginx"
|
|
|
|
|
#osSudo "${ROOT_USER}" service nginx restart
|
|
|
|
|
;;
|
|
|
|
@ -1415,21 +1480,22 @@ case $OS in
|
|
|
|
|
fi
|
|
|
|
|
if [ "${BITCOIN_MAINNET_ENABLE}" = ON ];then
|
|
|
|
|
osSudo "${ROOT_USER}" systemctl enable bitcoin.service
|
|
|
|
|
osSudo "${ROOT_USER}" systemctl enable electrs.service
|
|
|
|
|
osSudo "${ROOT_USER}" systemctl enable mempool.service
|
|
|
|
|
fi
|
|
|
|
|
if [ "${BITCOIN_TESTNET_ENABLE}" = ON ];then
|
|
|
|
|
osSudo "${ROOT_USER}" systemctl enable bitcoin-testnet.service
|
|
|
|
|
osSudo "${ROOT_USER}" systemctl enable electrs-testnet.service
|
|
|
|
|
osSudo "${ROOT_USER}" systemctl enable mempool-testnet.service
|
|
|
|
|
fi
|
|
|
|
|
if [ "${BITCOIN_SIGNET_ENABLE}" = ON ];then
|
|
|
|
|
osSudo "${ROOT_USER}" systemctl enable bitcoin-signet.service
|
|
|
|
|
osSudo "${ROOT_USER}" systemctl enable mempool-signet.service
|
|
|
|
|
fi
|
|
|
|
|
if [ "${BISQ_MAINNET_ENABLE}" = ON ];then
|
|
|
|
|
osSudo "${ROOT_USER}" systemctl enable bisq.service
|
|
|
|
|
osSudo "${ROOT_USER}" systemctl enable mempool-bisq.service
|
|
|
|
|
fi
|
|
|
|
|
if [ "${ELEMENTS_LIQUID_ENABLE}" = ON ];then
|
|
|
|
|
osSudo "${ROOT_USER}" systemctl enable liquid.service
|
|
|
|
|
osSudo "${ROOT_USER}" systemctl enable electrs-liquid.service
|
|
|
|
|
osSudo "${ROOT_USER}" systemctl enable mempool-liquid.service
|
|
|
|
|
fi
|
|
|
|
|
;;
|
|
|
|
|