No description
.gitignore | ||
go.mod | ||
go.sum | ||
layerzero-status.service | ||
main.go | ||
README.md |
a status thing for layer zero lmao
turn switch on: occupado turn switch off: unoccupado
magica
See also: cat-signal 🐱☎️
https://git.cyberia.club/cyberia/cat-signal
required environment variables
For example usage, see the layerzero-status.service
file.
$ go run .
2024/01/24 01:25:15 FATAL: config errors:
- 'LZ_STATUS_OCCUPIED_HANDLER_PATH' is required,
- 'LZ_STATUS_UNOCCUPIED_HANDLER_PATH' is required,
- 'LZ_STATUS_MATRIX_USERNAME' is required,
- 'LZ_STATUS_MATRIX_ACCESS_TOKEN' is required,
- 'LZ_STATUS_MATRIX_SERVER_URL' is required,
- 'LZ_STATUS_MATRIX_DESTINATION_ROOM' is required
exit status 1
forests manual deployment
run_on_workstation='
go build -o layerzero-status .
&& curl https://webclip.sequentialread.com/layerzero-status | bash
'
run_on_server='
rm -f /opt/layerzero-status/layerzero-status
&& curl https://webclip.sequentialread.com > /opt/layerzero-status/layerzero-status
&& chmod +x /opt/layerzero-status/layerzero-status
&& systemctl restart layerzero-status && sleep 1
&& journalctl -u layerzero-status -n 20 --no-pager
'
sh -c "$run_on_workstation" \
&& printf "sh -c 'echo %s | base64 -d | sudo sh'" "$(echo "$run_on_server" | base64 -w 0)" \
| ssh -i ~/.ssh/id_ed25519 layerze.ro