Handle NAS deploy without useradd
Prompts used since the previous commit: - sudo: useradd: command not found Special observations: - If useradd is unavailable, remote deployment now falls back to the existing SSH user and primary group. - The systemd template now has a separate group placeholder. - verplaats_log.json remains modified from the user's run and was intentionally not staged.
This commit is contained in:
@@ -149,6 +149,7 @@ Remote/NAS deployment files:
|
||||
- `deploy_vps.sh` is host-neutral despite its historical filename. It packages the repo excluding `.git`, `config.json`, logs, runtime JSON state/log files, bytecode, and local mailbox data; uploads to the SSH host in `REMOTE_HOST`; installs under `/opt/mailcat` by default; creates/uses a non-root system user named `mailcat` by default; installs a systemd service; enables but does not start the service.
|
||||
- The deploy script requires `REMOTE_HOST` and `REMOTE_USER`. The old `VPS_HOST` and `VPS_USER` names still work as aliases. Optional overrides: `APP_USER`, `APP_DIR`, `SERVICE_NAME`, and `ACCOUNT`.
|
||||
- The deploy script uploads a temporary remote shell script and runs it with `ssh -tt`, so remote `sudo` can prompt for a password on NAS systems that require a terminal. The remote script starts with `sudo -v`.
|
||||
- If the remote NAS does not have `useradd`, the deploy script falls back to the existing SSH user and that user's primary group for service ownership.
|
||||
- `systemd/mailcat-sort.service` is a template consumed by `deploy_vps.sh`; after placeholder replacement it runs `sort_mail_daemon.py --account backup --folder INBOX` and stores state/logs under `/var/lib/mailcat` and `/var/log/mailcat`.
|
||||
- `config.json` remains ignored and must be created manually on the remote host with mode `600` before starting the service.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user