Keep the files for the server in one directory
The resources were copied from home/ and admin/, which held the same files a second time. Everything that goes to the server is in resources/ now, and the generator only writes the four text files. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
parent
a17b2d76dc
commit
fd1e379fcf
1 changed files with 13 additions and 69 deletions
|
|
@ -62,18 +62,16 @@ undoes that.
|
|||
|
||||
## This directory
|
||||
|
||||
- `home/` - the files that belong in the home directory of the user: `~/.zshrc`, `~/.zshenv` and the keys in
|
||||
`~/.ssh/authorized_keys` - the one the website logs in with and the ones of the people who deploy. This is where
|
||||
they are edited.
|
||||
- `admin/` - the same for the home directory of the Administrator: the keys of the people who deploy. The key of the
|
||||
website is not among them and never gets administrator rights.
|
||||
- `resources/` - the copies the cleanup restores from: the files of `home/` and `admin/` and the four text files.
|
||||
- `scripts/make_files.py` - builds the resources.
|
||||
- `resources/` - everything that goes to the server: `home/` for the home directory of the root user - `~/.zshrc`,
|
||||
`~/.zshenv`, the keys in `~/.ssh/authorized_keys` and the four text files - and `admin/` for the home directory
|
||||
of the Administrator, which holds the keys of the people who deploy. The key of the website is not among them and
|
||||
never gets administrator rights.
|
||||
- `scripts/make_files.py` - builds the four text files.
|
||||
- `scripts/deploy.sh` - deploys the cleanup to the server and installs it.
|
||||
- `scripts/install_restore_task.ps1` - installs the scheduled task.
|
||||
- `scripts/restore_ssh_access.cmd` - puts the SSH access back, for when the home directory was deleted.
|
||||
|
||||
The resources are built from the website's pages and the files of `home/`:
|
||||
The four text files are built from the website's pages, the other files in the resources are edited by hand:
|
||||
|
||||
python3 server/scripts/make_files.py
|
||||
|
||||
|
|
@ -85,7 +83,7 @@ The script logs in as `Administrator` - whose shell is a Windows one - copies th
|
|||
Administrator's home directory and runs the installer there. It logs in with the personal key of the deployer, from
|
||||
the agent or from `-i`; the key of the website never gets administrator rights, it only logs in as the root user.
|
||||
It checks the host key against the one the website pins, and that the key of the website is the first one in
|
||||
`home/.ssh/authorized_keys`. `--uninstall` removes the task again.
|
||||
`resources/home/.ssh/authorized_keys`. `--uninstall` removes the task again.
|
||||
|
||||
The installer can also be run by hand, in an elevated PowerShell on the server:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue