Move all meta scripts to central directory
This commit is contained in:
parent
84d631a9c3
commit
5d1b740c20
8 changed files with 70 additions and 47 deletions
|
|
@ -1,40 +0,0 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
# This script is meant to be executed inside the repo root.
|
||||
|
||||
echo "###############"
|
||||
echo "## Compiling ##"
|
||||
echo "###############"
|
||||
cross build --release \
|
||||
--package showbits-thermal-printer \
|
||||
--target aarch64-unknown-linux-gnu
|
||||
or return 1
|
||||
|
||||
echo
|
||||
echo "###############"
|
||||
echo "## Uploading ##"
|
||||
echo "###############"
|
||||
rsync -vP \
|
||||
showbits-thermal-printer/meta/spinch.service \
|
||||
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
|
||||
|
||||
echo
|
||||
echo "################"
|
||||
echo "## Restarting ##"
|
||||
echo "################"
|
||||
ssh root@spinch "\
|
||||
systemctl daemon-reload \
|
||||
&& systemctl restart showbits-thermal-printer.service \
|
||||
&& systemctl restart showbits-thermal-printer-tunnel.service \
|
||||
"
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
[Unit]
|
||||
Description=Showbits Thermal Printer Tunnel
|
||||
|
||||
# https://wiki.archlinux.org/title/Systemd#Running_services_after_the_network_is_up
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=ssh plugh@plugh.de -NR 8005:localhost:8001 -o ExitOnForwardFailure=yes
|
||||
Restart=on-failure
|
||||
RestartSec=1min
|
||||
|
||||
User=bondrucker
|
||||
Group=bondrucker
|
||||
WorkingDirectory=~
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
[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