autoprovision: split script+unit into separate files
Now that we're using Jinja to render the kickstart scripts, we can separate out scripts, systemd unit files, etc. into their own files and `include` them. This makes editing them much easier, especially since syntax highlighting will work correctly.
This commit is contained in:
13
notify-online.sh
Normal file
13
notify-online.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -- \
|
||||
-F "hostname=$(hostname -f)" \
|
||||
-F 'sshkeys=<-;type=text/plain'
|
||||
|
||||
fw_cfg=/sys/firmware/qemu_fw_cfg/by_name/opt/dch/cfg-branch/raw
|
||||
if [ -r "${fw_cfg}" ]; then
|
||||
set -- "$@" -F branch="$(cat "${fw_cfg}")"
|
||||
fi
|
||||
|
||||
cat /etc/ssh/ssh_host_*_key.pub \
|
||||
| curl -fsS https://webhooks.pyrocufflink.blue/host/online "$@"
|
||||
Reference in New Issue
Block a user