Build the shell configuration into the resources

The shell configuration was copied from the server by hand. It now has
its own directory, which make_files.py copies into the resources, so
that the resources are the whole set of files the cleanup restores and
nothing has to be copied by hand.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
Zebreus 2026-10-25 13:05:22 +01:00
commit 917e3d6089

View file

@ -39,7 +39,11 @@ The scheduled task `KiK restore shell files` runs every 30 minutes and at every
stop it: the task, its script and the copies it restores from are readable and writable only by SYSTEM and the
administrators.
What it does:
Neither the setup nor the cleanup ever runs as the `root` user. The setup runs in an elevated PowerShell, as an
administrator, and refuses to run without those rights; the cleanup runs as SYSTEM. The `root` account is a
different one, without administrator rights, and it never executes any of it.
What the cleanup does:
1. Creates `/home/root` if it is gone, and gives the `root` account write access on it.
2. Puts every copy in `files/` back into the home directory: the shell configuration and the four text files.
@ -50,11 +54,12 @@ undoes that.
## This directory
- `resources/` - the copies the cleanup restores from: the four text files and the shell configuration.
- `scripts/make_files.py` - builds the four text files from the website's pages.
- `shell/` - the shell configuration, `~/.zshrc` and `~/.zshenv`, which is where the prompt is set.
- `resources/` - the copies the cleanup restores from: the shell configuration and the four text files.
- `scripts/make_files.py` - builds the resources.
- `scripts/install_restore_task.ps1` - installs the scheduled task.
The four text files are generated, the shell configuration is copied from the server by hand:
The resources are built from the website's pages and the shell configuration:
python3 server/scripts/make_files.py