Add a deploy script for the cleanup job

It logs in as Administrator, whose shell is a Windows one, copies the
scripts and the resources to the server and runs the installer there. It
uses the key the website uses and checks the host key against the one
the website pins.

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

View file

@ -57,6 +57,7 @@ undoes that.
- `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/deploy.sh` - deploys the cleanup to the server and installs it.
- `scripts/install_restore_task.ps1` - installs the scheduled task.
The resources are built from the website's pages and the shell configuration:
@ -65,7 +66,14 @@ The resources are built from the website's pages and the shell configuration:
## Installing the cleanup on the server
Copy `server/scripts` and `server/resources` to the server and run this in an elevated PowerShell:
server/scripts/deploy.sh
The script logs in as `Administrator` - whose shell is a Windows one - copies the scripts and the resources to the
Administrator's home directory and runs the installer there. It uses the key the website uses, which is authorized
for the Administrator account as well, and checks the host key against the one the website pins. `--uninstall`
removes the task again.
The installer can also be run by hand, in an elevated PowerShell on the server:
powershell -ExecutionPolicy Bypass -File .\scripts\install_restore_task.ps1