No description
Find a file
2024-01-24 02:10:31 -06:00
.gitignore First commit after purging hardcoded secrets 2024-01-24 01:24:53 -06:00
go.mod First commit after purging hardcoded secrets 2024-01-24 01:24:53 -06:00
go.sum First commit after purging hardcoded secrets 2024-01-24 01:24:53 -06:00
layerzero-status.service fixes 2024-01-24 01:53:56 -06:00
main.go link to cat-signal 2024-01-24 02:03:26 -06:00
README.md cleanup 2024-01-24 02:10:31 -06:00

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