From c57542c8aea619762678edbb6ee70bc8ae1d81ca Mon Sep 17 00:00:00 2001 From: Stephan Oeste Date: Sun, 20 Nov 2022 14:19:28 +0100 Subject: [PATCH 1/2] Add comandline options to cln on FreeBSD in pro install --- production/install | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/production/install b/production/install index 9bab3a418..5404594ae 100755 --- a/production/install +++ b/production/install @@ -1303,9 +1303,9 @@ if [ "${ELEMENTS_ELECTRS_INSTALL}" = ON ];then osSudo "${ELEMENTS_USER}" sh -c "cd ${ELEMENTS_ELECTRS_HOME} && cargo run --release --features liquid --bin electrs -- --network liquid --version" || true fi -##################################### -# Core Lightning for Bitcoin Mainnet # -##################################### +############################## +# Core Lightning for Bitcoin # +############################## echo "[*] Installing Core Lightning" case $OS in @@ -1324,15 +1324,21 @@ case $OS in osPackageInstall ${CLN_PKG} echo "[*] Installing Core Lightning mainnet Cronjob" - crontab_cln+='@reboot sleep 60 ; screen -dmS main lightningd --alias `hostname` --fee-base 0 --bitcoin-datadir /bitcoin\n' - crontab_cln+='@reboot sleep 90 ; screen -dmS tes lightningd --alias `hostname` --fee-base 0 --bitcoin-datadir /bitcoin --network testnet\n' - crontab_cln+='@reboot sleep 120 ; screen -dmS sig lightningd --alias `hostname` --fee-base 0 --bitcoin-datadir /bitcoin --network signet\n' + public_ipv4=$( ifconfig | grep 'inet ' | awk -F ' ' '{ print $2 }' | grep -v '^103\.165\.192\.' | grep -v '^127\.0\.0\.1' ) + public_ipv6=$( ifconfig | grep 'inet6' | awk -F ' ' '{ print $2 }' | grep -v '^2001:df6:7280::' | grep -v '^fe80::' | grep -v '^::1' ) + + crontab_cln+="@reboot sleep 60 ; screen -dmS main lightningd --rpc-file-mode 0660 --alias `hostname` --disable-ip-discovery --autolisten false --bind-addr $public_ipv4 --announce-addr $public_ipv4 --bind-addr $public_ipv6 --announce-addr $public_ipv6\n" + crontab_cln+="@reboot sleep 90 ; screen -dmS tes lightningd --rpc-file-mode 0660 --alias `hostname` --network testnet --disable-ip-discovery --autolisten false --bind-addr $public_ipv4 --announce-addr $public_ipv4 --bind-addr $public_ipv6 --announce-addr $public_ipv6\n" + crontab_cln+="@reboot sleep 120 ; screen -dmS sig lightningd --rpc-file-mode 0660 --alias `hostname` --network signet --disable-ip-discovery --autolisten false --bind-addr $public_ipv4 --announce-addr $public_ipv4 --bind-addr $public_ipv6 --announce-addr $public_ipv6 \n" + crontab_cln+="@reboot sleep 180 ; /mempool/mempool.space/lightning-seeder >/dev/null 2>&1\n" + crontab_cln+="1 * * * * /mempool/mempool.space/lightning-seeder >/dev/null 2>&1\n" echo "${crontab_cln}" | crontab -u "${CLN_USER}" - ;; Debian) ;; esac + ##################### # Bisq installation # ##################### From 5d95eb475e42b76a901f4e7ae017f2790e17fe00 Mon Sep 17 00:00:00 2001 From: Stephan Oeste Date: Sun, 20 Nov 2022 14:55:00 +0100 Subject: [PATCH 2/2] Add symlink to bitcoin config for user cln in prod install --- production/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/production/install b/production/install index 9bab3a418..992522afb 100755 --- a/production/install +++ b/production/install @@ -1319,6 +1319,8 @@ case $OS in osSudo "${ROOT_USER}" mkdir -p "${CLN_HOME}/.lightning/{bitcoin,signet,testnet}" osSudo "${ROOT_USER}" chmod 750 "${CLN_HOME}" "${CLN_HOME}/.lightning" "${CLN_HOME}/.lightning/{bitcoin,signet,testnet}" osSudo "${ROOT_USER}" chown -R "${CLN_USER}:${CLN_GROUP}" "${CLN_HOME}" + echo "[*] Creating symlink to .bitcoin folder" + osSudo "${CLN_USER}" ln -s "${BITCOIN_HOME}/.bitcoin" "${CLN_HOME}/.bitcoin" echo "[*] Installing Core Lightning package" osPackageInstall ${CLN_PKG}