mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-11-18 18:07:45 +01:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96f107f2c3 | ||
|
|
9143b4c68c | ||
|
|
829aa91f9e | ||
|
|
6aa3865608 | ||
|
|
c273425adc | ||
|
|
89355727f3 |
@@ -178,7 +178,7 @@ patch()
|
|||||||
newGitHubBranch=$(echo "${newGitHubBranch}" | cut -d " " -f1)
|
newGitHubBranch=$(echo "${newGitHubBranch}" | cut -d " " -f1)
|
||||||
echo "--> " $newGitHubBranch
|
echo "--> " $newGitHubBranch
|
||||||
error=""
|
error=""
|
||||||
source <(sudo -u admin /home/admin/XXsyncScripts.sh ${newGitHubBranch})
|
source <(sudo -u admin /home/admin/XXsyncScripts.sh -run ${newGitHubBranch})
|
||||||
if [ ${#error} -gt 0 ]; then
|
if [ ${#error} -gt 0 ]; then
|
||||||
whiptail --title "ERROR" --msgbox "${error}" 8 30
|
whiptail --title "ERROR" --msgbox "${error}" 8 30
|
||||||
fi
|
fi
|
||||||
@@ -195,9 +195,9 @@ patch()
|
|||||||
pullRequestID=$(echo "${pullRequestID}" | cut -d " " -f1)
|
pullRequestID=$(echo "${pullRequestID}" | cut -d " " -f1)
|
||||||
echo "--> " $pullRequestID
|
echo "--> " $pullRequestID
|
||||||
cd /home/admin/raspiblitz
|
cd /home/admin/raspiblitz
|
||||||
git fetch origin pull/${pullRequestID}/head:${pullRequestID}pr
|
git fetch origin pull/${pullRequestID}/head:pr${pullRequestID}
|
||||||
error=""
|
error=""
|
||||||
source <(sudo -u admin /home/admin/XXsyncScripts.sh ${pullRequestID}pr)
|
source <(sudo -u admin /home/admin/XXsyncScripts.sh -run pr${pullRequestID})
|
||||||
if [ ${#error} -gt 0 ]; then
|
if [ ${#error} -gt 0 ]; then
|
||||||
whiptail --title "ERROR" --msgbox "${error}" 8 30
|
whiptail --title "ERROR" --msgbox "${error}" 8 30
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -14,6 +14,12 @@ server {
|
|||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:23000;
|
proxy_pass http://127.0.0.1:23000;
|
||||||
|
|
||||||
|
|
||||||
|
# For websockets
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection $http_connection;
|
||||||
|
|
||||||
|
|
||||||
include /etc/nginx/snippets/ssl-proxy-params.conf;
|
include /etc/nginx/snippets/ssl-proxy-params.conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,11 @@ server {
|
|||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:23000;
|
proxy_pass http://127.0.0.1:23000;
|
||||||
|
|
||||||
|
# For websockets
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection $http_connection;
|
||||||
|
|
||||||
|
|
||||||
include /etc/nginx/snippets/ssl-proxy-params.conf;
|
include /etc/nginx/snippets/ssl-proxy-params.conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
source /mnt/hdd/raspiblitz.conf
|
source /mnt/hdd/raspiblitz.conf
|
||||||
|
echo "# bonus.cryptoadvance-specter.sh $1"
|
||||||
|
|
||||||
# show info menu
|
# show info menu
|
||||||
if [ "$1" = "menu" ]; then
|
if [ "$1" = "menu" ]; then
|
||||||
@@ -82,10 +83,6 @@ if [ "$1" = "status" ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# stop services
|
|
||||||
echo "# --> making sure the service is not running"
|
|
||||||
sudo systemctl stop cryptoadvance-specter 2>/dev/null
|
|
||||||
|
|
||||||
# switch on
|
# switch on
|
||||||
if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||||
echo "# --> INSTALL Cryptoadvance Specter ***"
|
echo "# --> INSTALL Cryptoadvance Specter ***"
|
||||||
@@ -262,6 +259,7 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
|||||||
if [ ${isInstalled} -eq 1 ]; then
|
if [ ${isInstalled} -eq 1 ]; then
|
||||||
|
|
||||||
echo "# --> REMOVING Cryptoadvance Specter"
|
echo "# --> REMOVING Cryptoadvance Specter"
|
||||||
|
sudo systemctl stop cryptoadvance-specter
|
||||||
sudo systemctl disable cryptoadvance-specter
|
sudo systemctl disable cryptoadvance-specter
|
||||||
sudo rm /etc/systemd/system/cryptoadvance-specter.service
|
sudo rm /etc/systemd/system/cryptoadvance-specter.service
|
||||||
sudo -u bitcoin /home/bitcoin/.specter/.env/bin/python3 -m pip uninstall --yes cryptoadvance.specter
|
sudo -u bitcoin /home/bitcoin/.specter/.env/bin/python3 -m pip uninstall --yes cryptoadvance.specter
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
sudo -u joinmarket git clone https://github.com/openoms/joininbox.git /home/joinmarket/joininbox
|
sudo -u joinmarket git clone https://github.com/openoms/joininbox.git /home/joinmarket/joininbox
|
||||||
# check the latest at:
|
# check the latest at:
|
||||||
# https://github.com/openoms/joininbox/releases/
|
# https://github.com/openoms/joininbox/releases/
|
||||||
sudo -u joinmarket git reset --hard v0.1.4
|
sudo -u joinmarket git reset --hard v0.1.5
|
||||||
sudo -u joinmarket cp /home/joinmarket/joininbox/scripts/* /home/joinmarket/
|
sudo -u joinmarket cp /home/joinmarket/joininbox/scripts/* /home/joinmarket/
|
||||||
sudo -u joinmarket cp /home/joinmarket/joininbox/scripts/.* /home/joinmarket/ 2>/dev/null
|
sudo -u joinmarket cp /home/joinmarket/joininbox/scripts/.* /home/joinmarket/ 2>/dev/null
|
||||||
sudo chmod +x /home/joinmarket/*.sh
|
sudo chmod +x /home/joinmarket/*.sh
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import sys
|
|||||||
# display config script info
|
# display config script info
|
||||||
if len(sys.argv) <= 1 or sys.argv[1] == "-h" or sys.argv[1] == "help":
|
if len(sys.argv) <= 1 or sys.argv[1] == "-h" or sys.argv[1] == "help":
|
||||||
print("forward ports from another server to raspiblitz with reverse SSH tunnel")
|
print("forward ports from another server to raspiblitz with reverse SSH tunnel")
|
||||||
print("internet.sshtunnel.py [on|off|restore] [USER]@[SERVER:PORT] \"[INTERNAL-PORT]<[EXTERNAL-PORT]\"")
|
print("internet.sshtunnel.py on|off|restore USER@SERVER:PORT [--m:MONITORINGPORT] \"INTERNAL-PORT<EXTERNAL-PORT\"")
|
||||||
print("note that [INTERNAL-PORT]<[EXTERNAL-PORT] can one or multiple forwardings")
|
print("note that INTERNAL-PORT<EXTERNAL-PORT can one or multiple forwardings")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -31,7 +31,7 @@ After=network.target
|
|||||||
User=root
|
User=root
|
||||||
Group=root
|
Group=root
|
||||||
Environment="AUTOSSH_GATETIME=0"
|
Environment="AUTOSSH_GATETIME=0"
|
||||||
ExecStart=/usr/bin/autossh -M 0 -N -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -o ServerAliveCountMax=2 [PLACEHOLDER]
|
ExecStart=/usr/bin/autossh [MONITORING-PORT] -N -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -o ServerAliveCountMax=2 [PLACEHOLDER]
|
||||||
StandardOutput=journal
|
StandardOutput=journal
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
@@ -77,11 +77,24 @@ def on(restore_on_update=False):
|
|||||||
|
|
||||||
# generate additional parameter for autossh (forwarding ports)
|
# generate additional parameter for autossh (forwarding ports)
|
||||||
if len(sys.argv) < 4:
|
if len(sys.argv) < 4:
|
||||||
print("[INTERNAL-PORT]<[EXTERNAL-PORT] missing")
|
print("missing parameters")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
# check for optional monitoring port parameter
|
||||||
|
i = 3
|
||||||
|
monitoringPort="-M 0"
|
||||||
|
optionalParameter=""
|
||||||
|
if sys.argv[3].count("--m:") > 0:
|
||||||
|
# get monitoring port number
|
||||||
|
monitoringPort = sys.argv[3][4:]
|
||||||
|
optionalParameter= "--m:{} ".format(monitoringPort)
|
||||||
|
monitoringPort = "-M {}".format(monitoringPort)
|
||||||
|
print("# found optional monitoring port: {}".format(monitoringPort))
|
||||||
|
# port forwadings start one parameter later
|
||||||
|
i = 4
|
||||||
|
|
||||||
ssh_ports = ""
|
ssh_ports = ""
|
||||||
additional_parameters = ""
|
additional_parameters = ""
|
||||||
i = 3
|
|
||||||
while i < len(sys.argv):
|
while i < len(sys.argv):
|
||||||
|
|
||||||
# check forwarding format
|
# check forwarding format
|
||||||
@@ -122,7 +135,8 @@ def on(restore_on_update=False):
|
|||||||
|
|
||||||
# generate custom service config
|
# generate custom service config
|
||||||
service_data = SERVICE_TEMPLATE.replace("[PLACEHOLDER]", additional_parameters)
|
service_data = SERVICE_TEMPLATE.replace("[PLACEHOLDER]", additional_parameters)
|
||||||
|
service_data = service_data.replace("[MONITORING-PORT]", monitoringPort)
|
||||||
|
|
||||||
# debug print out service
|
# debug print out service
|
||||||
print()
|
print()
|
||||||
print("*** New systemd service: {}".format(SERVICE_NAME))
|
print("*** New systemd service: {}".format(SERVICE_NAME))
|
||||||
@@ -157,7 +171,7 @@ def on(restore_on_update=False):
|
|||||||
file_content = f.read()
|
file_content = f.read()
|
||||||
if file_content.count("sshtunnel=") == 0:
|
if file_content.count("sshtunnel=") == 0:
|
||||||
file_content = file_content + "\nsshtunnel=''"
|
file_content = file_content + "\nsshtunnel=''"
|
||||||
file_content = re.sub("sshtunnel=.*", "sshtunnel='%s %s'" % (ssh_server, ssh_ports), file_content)
|
file_content = re.sub("sshtunnel=.*", "sshtunnel='%s %s%s'" % (ssh_server, optionalParameter, ssh_ports), file_content)
|
||||||
|
|
||||||
if not restore_on_update:
|
if not restore_on_update:
|
||||||
server_domain = ssh_server.split("@")[1]
|
server_domain = ssh_server.split("@")[1]
|
||||||
|
|||||||
Reference in New Issue
Block a user