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

Itchysats #1

Open
wants to merge 5 commits into
base: v1.7
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ There are further Services that can be switched on:
* **CL plugin: Sparko** (WalletUI & HTTP-RPC bridge) [details](https://github.com/fiatjaf/sparko#the-sparko-plugin)
* **CL plugin: CLBOSS** (Automated Node Manager) [details](https://github.com/ZmnSCPxj/clboss#clboss-the-c-lightning-node-manager)
* **Tallycoin Connect** (Use Tallycoin with your own node) [details](https://github.com/djbooth007/tallycoin_connect)
* **ItchySats** (Non-custodial peer-to-peer CFD trading) [details](https://github.com/itchysats/itchysats)

You can connect the following Wallet-Apps to your RaspiBlitz:

Expand Down
6 changes: 6 additions & 0 deletions home.admin/00mainMenu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ fi
if [ "${tallycoinConnect}" == "on" ]; then
OPTIONS+=(TALLY "Tallycoin Connect")
fi
if [ "${itchysats}" == "on" ]; then
OPTIONS+=(ITCHYSATS "ItchySats")
fi

# dont offer to switch to "testnet view for now" - so no wswitch back to mainnet needed
#if [ ${chain} != "main" ]; then
Expand Down Expand Up @@ -303,6 +306,9 @@ case $CHOICE in
HELIPAD)
sudo /home/admin/config.scripts/bonus.helipad.sh menu
;;
ITCHYSATS)
sudo /home/admin/config.scripts/bonus.itchysats.sh menu
;;
CHANTOOLS)
sudo /home/admin/config.scripts/bonus.chantools.sh menu
;;
Expand Down
18 changes: 17 additions & 1 deletion home.admin/00settingsMenuServices.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ if [ ${#spark} -eq 0 ]; then spark="off"; fi
if [ ${#tallycoinConnect} -eq 0 ]; then tallycoinConnect="off"; fi
if [ ${#helipad} -eq 0 ]; then helipad="off"; fi
if [ ${#bitcoinminds} -eq 0 ]; then bitcoinminds="off"; fi
if [ ${#itchysats} -eq 0 ]; then itchysats="off"; fi

# show select dialog
echo "run dialog ..."
Expand All @@ -45,9 +46,9 @@ if [ "${network}" == "bitcoin" ]; then
OPTIONS+=(j 'BTC JoinMarket+JoininBox menu' ${joinmarket})
OPTIONS+=(w 'BTC Download Bitcoin Whitepaper' ${whitepaper})
OPTIONS+=(v 'BTC Install BitcoinMinds.org' ${bitcoinminds})
OPTIONS+=(u 'BTC Install ItchySats' ${itchysats})
fi


# available for both LND & c-lightning
if [ "${lnd}" == "on" ] || [ "${cl}" == "on" ]; then
OPTIONS+=(i 'LNbits (Lightning Accounts)' ${LNBits})
Expand Down Expand Up @@ -578,6 +579,21 @@ else
echo "# Spark Wallet on mainnet Setting unchanged."
fi

# ItchySats process choice
choice="off"; check=$(echo "${CHOICES}" | grep -c "u")
if [ ${check} -eq 1 ]; then choice="on"; fi
if [ "${itchysats}" != "${choice}" ]; then
echo "ItchySats setting changed .."
anychange=1
sudo -u admin /home/admin/config.scripts/bonus.itchysats.sh ${choice}
if [ "${choice}" = "on" ]; then
sudo systemctl start itchysats
sudo -u admin /home/admin/config.scripts/bonus.itchysats.sh menu
fi
else
echo "ItchySats setting unchanged."
fi

if [ ${anychange} -eq 0 ]; then
dialog --msgbox "NOTHING CHANGED!\nUse Spacebar to check/uncheck services." 8 58
exit 0
Expand Down
7 changes: 7 additions & 0 deletions home.admin/99updateMenu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,10 @@ if [ "${runBehindTor}" == "on" ]; then
OPTIONS+=(TOR "Update Tor from the source code")
fi

if [ "${itchysats}" == "on" ]; then
OPTIONS+=(ITCHYSATS "Update ItchySats")
fi

CHOICE_HEIGHT=$(("${#OPTIONS[@]}/2+1"))
HEIGHT=$((CHOICE_HEIGHT+6))
CHOICE=$(dialog --clear \
Expand Down Expand Up @@ -538,4 +542,7 @@ case $CHOICE in
MEMPOOL)
/home/admin/config.scripts/bonus.mempool.sh update
;;
ITCHYSATS)
/home/admin/config.scripts/bonus.itchysats.sh update
;;
esac
9 changes: 9 additions & 0 deletions home.admin/_provision_.sh
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,15 @@ else
echo "Provisioning bitcoinminds.org - keep default" >> ${logFile}
fi

# itchysats
if [ "${itchysats}" = "on" ]; then
echo "Provisioning ItchySats - run config script" >> ${logFile}
sudo sed -i "s/^message=.*/message='Setup ItchySats'/g" ${infoFile}
sudo -u admin /home/admin/config.scripts/bonus/itchysats.sh on >> ${logFile} 2>&1
else
echo "ItchySats - keep default" >> ${logFile}
fi

# custom install script from user
customInstallAvailable=$(ls /mnt/hdd/app-data/custom-installs.sh 2>/dev/null | grep -c "custom-installs.sh")
if [ ${customInstallAvailable} -gt 0 ]; then
Expand Down
33 changes: 33 additions & 0 deletions home.admin/assets/nginx/sites-available/itchysats_ssl.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## itchysats_ssl.conf

server {
listen 8889 ssl;
listen [::]:8889 ssl;
server_name _;

include /etc/nginx/snippets/ssl-params.conf;
include /etc/nginx/snippets/ssl-certificate-app-data.conf;

access_log /var/log/nginx/access_itchysats.log;
error_log /var/log/nginx/error_itchysats.log;

location / {
proxy_pass http://127.0.0.1:8888;
proxy_pass_header Authorization;

include /etc/nginx/snippets/ssl-proxy-params.conf;

proxy_set_header Authorization $http_authorization;
proxy_set_header X-Forwarded-User $remote_user;
proxy_pass_header Authorization;

# for SSE
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;

}

}
25 changes: 25 additions & 0 deletions home.admin/assets/nginx/sites-available/itchysats_tor.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## itchysats_tor.conf

server {
listen localhost:8890;
server_name _;

access_log /var/log/nginx/access_itchysats.log;
error_log /var/log/nginx/error_itchysats.log;

location / {
proxy_pass http://127.0.0.1:8888;
proxy_pass_header Authorization;

include /etc/nginx/snippets/ssl-proxy-params.conf;
proxy_set_header Authorization $http_authorization;
proxy_set_header X-Forwarded-User $remote_user;

# for SSE
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
}
}
28 changes: 28 additions & 0 deletions home.admin/assets/nginx/sites-available/itchysats_tor_ssl.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## itchysats_tor_ssl.conf

server {
listen localhost:8891 ssl;
server_name _;

include /etc/nginx/snippets/ssl-params.conf;
include /etc/nginx/snippets/ssl-certificate-app-data-tor.conf;

access_log /var/log/nginx/access_itchysats.log;
error_log /var/log/nginx/error_itchysats.log;

location / {
proxy_pass http://127.0.0.1:8888;
proxy_pass_header Authorization;

include /etc/nginx/snippets/ssl-proxy-params.conf;
proxy_set_header Authorization $http_authorization;
proxy_set_header X-Forwarded-User $remote_user;

# for SSE
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
}
}
Loading