Files
lxd-profiles/demo/lib.sh
T
xavierandClaude Opus 5.5 8e7557865d docs: Backrest tutorial with recorded demos and UI screenshots (demo/backrest)
- demo/backrest/README.md (fr) and README.en.md: a backup instance reading
  the data volume of another instance read-only, restic repository on its own
  volume, Backrest configured from the web UI, then restic on the command
  line and restoring a lost file
- install and restore scenarios recorded with autocast; restore configures
  Backrest through its configuration file (autoInitialize)
- UI screenshots made by screenshots.sh: a Debian instance with Chromium
  driven by Playwright fills in the forms
- demo/lib.sh: helpers shared by the tutorial preambles
- Docker tutorial: a filesystem volume can be shared by several instances,
  two Docker daemons must not share /var/lib/docker

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018inUJkPw1qcoCubeKqfffm
2026-11-21 21:19:06 +01:00

18 lines
632 B
Bash

# shellcheck shell=bash
# Helpers shared by the hidden preambles of the tutorial demos (demo/*/setup.sh).
# Root shell of an instance, made recordable: its prompt (root@<instance>) ends
# with the marker autocast waits for, and its input is not echoed twice (no
# readline, no tty echo). Only for instances created by the demo.
demo_instance_shell() {
lxc exec "$1" -- sh -c "cat >> /root/.bashrc" <<RC
PS1='\[\e[1;32m\]root@$1\[\e[0m\]:\w# AUTOCAST_PROMPT'
set +o emacs; stty -echo
RC
}
# Wait for the end of cloud-init in an instance (quietly)
demo_wait_cloud_init() {
lxc exec "$1" -- cloud-init status --wait >/dev/null
}