Skip to content
Snippets Groups Projects
Verified Commit 01fa1f73 authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

feat(systemd): Autoamtically fall back to container image

This patch makes the systemd unit automatically fall back to
the podman container in order to run hcloud-dynfw. This reduces
the friction to get things set up.
parent baf1fbc5
No related branches found
No related tags found
No related merge requests found
Pipeline #15961 passed
#!/bin/sh #!/bin/sh
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
# Allow to load the secret from proper secrets store # Allow to load the secret from proper secrets store
# in this key GNOME keyring # in this key GNOME keyring
if [ -z "$HCLOUD_TOKEN" ]; then if [ -z "$HCLOUD_TOKEN" ]; then
export HCLOUD_TOKEN="$(secret-tool lookup com.shivering-isles.git.sheogorath.hcloud-dynfw/api.hetzner.cloud api-key)" export HCLOUD_TOKEN="$(secret-tool lookup com.shivering-isles.git.sheogorath.hcloud-dynfw/api.hetzner.cloud api-key)"
fi fi
if command -v hcloud-dynfw >/dev/null 2>&1; then
exec hcloud-dynfw exec hcloud-dynfw
else
podman run --rm -it -e HCLOUD_TOKEN --env-file "$XDG_CONFIG_HOME/hcloud-dynfw/env" quay.io/sheogorath/hcloud-dynfw
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment