add doctor, scheduled backups and fetch; release 0.0.12
release / deb (push) Successful in 17s

- doctor [<name>] [--fix]: checks the system (user, programs, folders,
  zips, units and leftover copies in /etc, sandbox access to moved
  folders, journal, polkit, daemon, orphaned boot links and schedules)
  and each instance (ownership, server zip, config paths, mods, ports,
  failed starts/backups), with a fix for each. --fix applies the safe
  ones and re-checks them.
- backup enable|disable|now|list: a systemd timer per instance
  (terraria-backup@.timer, Persistent=), saving the world first, into
  /var/lib/terraria/backups/<name>/ (group-readable), pruning only
  scheduled backups. rename carries the schedule, delete removes it.
  upgrade's backups move there too.
- fetch vanilla|tmodloader [<version>] [--list] [--upgrade <name>]:
  downloads from terraria.org / tModLoader's GitHub releases, checks
  GitHub's sha256 and the zip, names it with its version.
- terractld may write /etc/systemd/system, for backup enable and
  doctor --fix over --host.
- Units, tmpfiles, packaging, completion, docs and changelog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
adamandClaude Opus 5.5 committed 2026-10-02 22:26:56 +00:00
1 parent 8a509f1398
commit fc2c08d47b
14 files changed
+1118 -56

No files matched your search

+3
View File
@@ -6,6 +6,9 @@ case "$1" in
# Forget which instances were enabled at boot
rm -f /etc/systemd/system/multi-user.target.wants/terraria@*.service
rm -rf /etc/systemd/system/terraria@.service.d
# Scheduled backups (the backups themselves stay in /var/lib/terraria/backups)
rm -f /etc/systemd/system/timers.target.wants/terraria-backup@*.timer
rm -rf /etc/systemd/system/terraria-backup@*.timer.d /etc/systemd/system/terraria-backup@*.service.d
# The daemon: whether it's on, its certificate and the computers it trusts
rm -f /etc/systemd/system/multi-user.target.wants/terractld.service
rm -rf /etc/systemd/system/terractld.service.d /var/lib/terractl
+1
View File
@@ -8,6 +8,7 @@ case "$1" in
remove|deconfigure)
if [ -d /run/systemd/system ]; then
systemctl stop terractld.service || true
systemctl stop 'terraria-backup@*.timer' 'terraria-backup@*.service' || true
units=$(systemctl list-units --plain --no-legend --all 'terraria@*.service' | awk '{print $1}')
if [ -n "$units" ]; then
echo "Stopping Terraria instances: $units"