From 3609b1b7601e403228120f014517b858b19575ff Mon Sep 17 00:00:00 2001 From: Joscha Date: Thu, 27 Feb 2025 16:36:03 +0100 Subject: [PATCH] Set up ssh tunnel from spinch to plugh.de --- showbits-thermal-printer/meta/deploy-to-spinch | 11 +++++++++-- .../meta/spinch-tunnel.service | 14 ++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 showbits-thermal-printer/meta/spinch-tunnel.service diff --git a/showbits-thermal-printer/meta/deploy-to-spinch b/showbits-thermal-printer/meta/deploy-to-spinch index 82974b9..19a5547 100755 --- a/showbits-thermal-printer/meta/deploy-to-spinch +++ b/showbits-thermal-printer/meta/deploy-to-spinch @@ -12,11 +12,18 @@ rsync -vP \ bondrucker@spinch:showbits-thermal-printer.service or return 1 +rsync -vP \ + showbits-thermal-printer/meta/spinch-tunnel.service \ + bondrucker@spinch:showbits-thermal-printer-tunnel.service +or return 1 + rsync -vP \ target/aarch64-unknown-linux-gnu/release/showbits-thermal-printer \ bondrucker@spinch:showbits-thermal-printer or return 1 ssh root@spinch "\ -systemctl daemon-reload && \ -systemctl restart showbits-thermal-printer.service" +systemctl daemon-reload \ +&& systemctl restart showbits-thermal-printer.service \ +&& systemctl restart showbits-thermal-printer-tunnel.service \ +" diff --git a/showbits-thermal-printer/meta/spinch-tunnel.service b/showbits-thermal-printer/meta/spinch-tunnel.service new file mode 100644 index 0000000..fe85168 --- /dev/null +++ b/showbits-thermal-printer/meta/spinch-tunnel.service @@ -0,0 +1,14 @@ +[Unit] +Description=Showbits Thermal Printer Tunnel + +[Service] +Type=simple +ExecStart=ssh plugh@plugh.de -NR 8005:localhost:8001 +Restart=on-failure + +User=bondrucker +Group=bondrucker +WorkingDirectory=~ + +[Install] +WantedBy=multi-user.target