Set up ssh tunnel from spinch to plugh.de
This commit is contained in:
parent
d53b86d3ca
commit
3609b1b760
2 changed files with 23 additions and 2 deletions
|
|
@ -12,11 +12,18 @@ rsync -vP \
|
||||||
bondrucker@spinch:showbits-thermal-printer.service
|
bondrucker@spinch:showbits-thermal-printer.service
|
||||||
or return 1
|
or return 1
|
||||||
|
|
||||||
|
rsync -vP \
|
||||||
|
showbits-thermal-printer/meta/spinch-tunnel.service \
|
||||||
|
bondrucker@spinch:showbits-thermal-printer-tunnel.service
|
||||||
|
or return 1
|
||||||
|
|
||||||
rsync -vP \
|
rsync -vP \
|
||||||
target/aarch64-unknown-linux-gnu/release/showbits-thermal-printer \
|
target/aarch64-unknown-linux-gnu/release/showbits-thermal-printer \
|
||||||
bondrucker@spinch:showbits-thermal-printer
|
bondrucker@spinch:showbits-thermal-printer
|
||||||
or return 1
|
or return 1
|
||||||
|
|
||||||
ssh root@spinch "\
|
ssh root@spinch "\
|
||||||
systemctl daemon-reload && \
|
systemctl daemon-reload \
|
||||||
systemctl restart showbits-thermal-printer.service"
|
&& systemctl restart showbits-thermal-printer.service \
|
||||||
|
&& systemctl restart showbits-thermal-printer-tunnel.service \
|
||||||
|
"
|
||||||
|
|
|
||||||
14
showbits-thermal-printer/meta/spinch-tunnel.service
Normal file
14
showbits-thermal-printer/meta/spinch-tunnel.service
Normal file
|
|
@ -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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue