Add Minecraft seed prompt and disaster-recovery backup service
- minecraft: prompt for world seed on new installs (skipped if world already exists); SEED env var wired into docker-compose.yml - disaster-backup: new service that stops each Docker service, snapshots the full ~/docker/<service>/ directory (config + data + databases), then restarts it — multi-destination support so different services can go to different drives/repos; one restore_kopia_backup.sh per destination - README: update backup row to list both backup and disaster-backup https://claude.ai/code/session_019XgsQ13XKm4Zj3cNsDNwHj
This commit is contained in:
@@ -139,6 +139,17 @@ print(snaps[0] if snaps else '')
|
||||
local GAMEMODE=""
|
||||
prompt_text "Game mode (survival/creative/adventure) [survival]:" "survival" GAMEMODE
|
||||
|
||||
local MC_SEED=""
|
||||
if [ -d "$MC_DIR/data/world" ]; then
|
||||
log_info "Existing world detected at $MC_DIR/data/world — seed ignored (applies to new worlds only)."
|
||||
else
|
||||
echo ""
|
||||
echo " World seed — controls terrain generation. Leave blank for a random seed."
|
||||
echo " Examples: 8675309 -3965137388347648926 minecraft"
|
||||
prompt_text " World seed [random]:" "" MC_SEED
|
||||
[ -n "$MC_SEED" ] && log_info " Seed set: $MC_SEED"
|
||||
fi
|
||||
|
||||
local WHITELIST=""
|
||||
prompt_yn "Enable whitelist? (y/n) [n]:" "n" WHITELIST
|
||||
local WHITELIST_ENABLED=false
|
||||
@@ -1336,6 +1347,7 @@ PREGENINFOEOF
|
||||
MC_ENV+=" - ENABLE_RCON=false"$'\n'
|
||||
MC_ENV+=" - MOTD=${SERVER_NAME}"$'\n'
|
||||
MC_ENV+=" - CREATE_CONSOLE_IN_PIPE=true"$'\n'
|
||||
[ -n "$MC_SEED" ] && MC_ENV+=" - SEED=${MC_SEED}"$'\n'
|
||||
if [ "$SUPPORTS_FABRIC_MODS" = true ]; then
|
||||
MC_ENV+=" - MODS_DIR=/mods"$'\n'
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user