Commit Graph

4 Commits (main)

Author SHA1 Message Date
Amir Alexander Abdelbaki 24d890c9c9 Derive mc-refresh-restart.sh settings from deploy.conf
The refresh script kept its own copy of the pack directory and the three URLs,
so every deployment had to hand-edit it after running the installer — the last
manual step and an easy one to forget or get wrong.

It now sources deploy.conf when one sits next to it and derives PACK_DIR,
BASE_URL, CLIENT_URL and PACK_URL from PACK_NAME, SHARE and MIRROR_URL. The
CONFIG block remains as the fallback when there is no config file, so the
script still works standalone.

CLIENT_URL was also referenced by the sync but never defined in the CONFIG
block, which would have been an unbound variable under set -u on the first run
with client mods. Verified both the with-config and without-config paths.

Also gitignore deploy.conf and DEPLOY-NOTES.md as machine-local files.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-06 01:21:02 +02:00
Amir Alexander Abdelbaki 361d3ed82a Support client-only mods via a separate side=client directory
Rendering mods link against LWJGL, which a dedicated server does not have, so
Sodium in mods/ killed the server at boot with NoClassDefFoundError on
org/lwjgl/Version. The kit had nowhere else to put such a mod: it used the
server's own mods/ as the mirror, so reaching clients and not being loaded by
the server were mutually exclusive.

$SHARE/client-mods is now mirrored alongside mods/ and enters the pack with
side = "client", so packwiz-installer delivers it to players while the server
never loads it. packwiz url add always writes side = "both", so the field is
rewritten explicitly after each add — inserted when absent, replaced when
present, and re-asserted on unchanged mods in case it drifted.

Covers packwiz-setup.sh, mc-refresh-restart.sh (both directories synced through
one function), packwiz-http.py (allowlist) and mc-service-setup.sh (creates the
directory). Traversal out of client-mods/ is still refused.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-06 01:10:13 +02:00
Amir Alexander Abdelbaki ae1671b361 Deploy a complete instance with no mods present
Two things stopped a from-scratch deploy finishing in one run.

The mirror reachability probe ran before counting jars, so a fresh instance
with an empty mods directory still failed on an unreachable mirror despite
having nothing to fetch. The probe now runs only when there is at least one jar,
which also means the reverse proxy does not have to be in place yet to build the
initial pack. mc-refresh-restart.sh gets the same treatment: zero jars is a
legitimate state, and the orphan sweep clears the metadata to match.

The probe itself never worked. curl -w '%{http_code}' already prints 000 on a
connection failure, so the trailing "|| echo 000" appended a second one and the
value was 000000, matching neither the unreachable case nor anything else — the
guard silently degraded to a warning. Use "|| true" with a :-000 fallback.
Verified against a refused port and a live host.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 23:38:57 +02:00
Amir Alexander Abdelbaki e738422dbe Initial commit: packwiz + NeoForge hosting kit
Deploys a self-hosted NeoForge server whose modpack clients pull automatically
on launch, with mods served from an HTTP mirror of the server's own mods dir
rather than Modrinth or CurseForge.

- mc-service-setup.sh: minecraft user, NeoForge install, systemd service paired
  with a console FIFO socket so stops are graceful and the world saves
- packwiz-setup.sh: packwiz install, pack init, mod index built from the
  mirror, and per-OS player setup guides generated with real URLs baked in
- mc-refresh-restart.sh: re-sync after mod changes, ZFS snapshot, restart
- deploy.sh: runs the above in order
- build.sh: release zip, refusing to package scripts that don't parse

Every entry point refuses to run when /minecraft is not a mountpoint, so an
unmounted dataset cannot silently fill the root filesystem.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 22:23:34 +02:00