#!/usr/bin/env bash # # How these guides work # https://www.zadran.net/guides/how-these-guides-work # Generated from the guide, last updated 2026-09-12. # # NO WARRANTY. This script is provided as is. You are responsible for # understanding what it does before running it, and for the consequences. # Take a backup first. See https://www.zadran.net/disclaimer # # Destructive steps are left commented out on purpose -- uncomment them # only once you have understood what they do. set -euo pipefail # ---- Set these for your environment ---- # The machine you are working on HOST_NAME='nas.example.lan' # The account you run these commands as USER_NAME='admin' # Created under /tmp, deleted at the end PROJECT_DIR='example-project' # Where this site is served from SITE_URL='https://www.zadran.net' echo "Setting up ${PROJECT_DIR} on ${HOST_NAME} as ${USER_NAME}" mkdir -p /tmp/${PROJECT_DIR} cd /tmp/${PROJECT_DIR} printf 'host=%s\nuser=%s\n' "${HOST_NAME}" "${USER_NAME}" > config.ini cat /tmp/${PROJECT_DIR}/config.ini # !! DESTRUCTIVE -- review, then uncomment to run: # rm -rf /tmp/${PROJECT_DIR} curl -O ${SITE_URL}/guides/how-these-guides-work/script.sh less how-these-guides-work.sh