refactor: replace install.sh with Python install.py
This commit is contained in:
+3
-3
@@ -37,7 +37,7 @@ rsync -avz \
|
||||
user@your-server:/tmp/nuntius/
|
||||
```
|
||||
|
||||
> `install.sh` lives in the repository root. The systemd unit is included inline in Option A below (you do not need to rsync it from the repo). `.env.example` is a template for the secrets file. Adjust the `rsync` source list to match what you keep checked in.
|
||||
> `install.py` lives in the repository root. The systemd unit is included inline in Option A below (you do not need to rsync it from the repo). `.env.example` is a template for the secrets file. Adjust the `rsync` source list to match what you keep checked in.
|
||||
|
||||
## 2. Install on the Server (SSH Session)
|
||||
|
||||
@@ -97,7 +97,7 @@ sudo journalctl -u nuntius -f
|
||||
|
||||
The service file expects the binary at `/usr/local/bin/nuntius`, the env file at `/etc/nuntius/.env`, and the data dir at `/var/lib/nuntius` (the config's `data_dir: "./data"` resolves to `/var/lib/nuntius/data` because the unit sets `WorkingDirectory=/var/lib/nuntius`). If you'd rather use `/opt/nuntius/...` or any other layout, edit the systemd unit block above before installing.
|
||||
|
||||
### Option B — `install.sh` (idempotent)
|
||||
### Option B — `install.py` (idempotent)
|
||||
|
||||
Before running the script, copy the systemd unit from the block in Option A above into `/tmp/nuntius/nuntius.service` (the script reads it from the current working directory):
|
||||
|
||||
@@ -106,7 +106,7 @@ ssh user@your-server
|
||||
cd /tmp/nuntius
|
||||
# Paste the [Unit]…[Install] block from Option A into this file:
|
||||
sudo $EDITOR /tmp/nuntius/nuntius.service
|
||||
sudo bash install.sh
|
||||
sudo python3 install.py
|
||||
```
|
||||
|
||||
The script is idempotent: re-running on an already-installed host is safe. It:
|
||||
|
||||
Reference in New Issue
Block a user