Deploy thermal printer to spinch
This commit is contained in:
parent
6555e9c0bd
commit
25e1679701
2 changed files with 36 additions and 0 deletions
22
showbits-thermal-printer/meta/deploy-to-spinch
Executable file
22
showbits-thermal-printer/meta/deploy-to-spinch
Executable file
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/usr/bin/env fish
|
||||||
|
|
||||||
|
# This script is meant to be executed inside the repo root.
|
||||||
|
|
||||||
|
cross build --release \
|
||||||
|
--package showbits-thermal-printer \
|
||||||
|
--target aarch64-unknown-linux-gnu
|
||||||
|
or return 1
|
||||||
|
|
||||||
|
rsync -vP \
|
||||||
|
showbits-thermal-printer/meta/spinch.service \
|
||||||
|
bondrucker@spinch:showbits-thermal-printer.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"
|
||||||
14
showbits-thermal-printer/meta/spinch.service
Normal file
14
showbits-thermal-printer/meta/spinch.service
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Showbits Thermal Printer
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/home/bondrucker/showbits-thermal-printer 0.0.0.0:8001 queue -p /dev/usb/lp0
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
User=bondrucker
|
||||||
|
Group=bondrucker
|
||||||
|
WorkingDirectory=~
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
Loading…
Add table
Add a link
Reference in a new issue