Add setup-remote.sh script and publish it via getbin.xyz CI
All checks were successful
Build-Publish / build (linux/amd64) (push) Successful in 4s
Build-Publish / build (linux/arm64) (push) Successful in 11s
Build-Publish / create-manifest (push) Successful in 2s
Build-Publish / publish-template (push) Successful in 14s

This commit is contained in:
j
2026-03-08 09:44:40 +13:00
parent 1ec3cfd473
commit ce55d6acc7
3 changed files with 254 additions and 8 deletions

View File

@@ -13,9 +13,10 @@ A Dropshell template that provides a web dashboard showing the status of your se
- **Network**: all interfaces with IPv4/IPv6, MAC, state, speed, driver
- **Routing**: default gateway and interface
- **DNS**: configured nameservers
- **Temperatures**: CPU/chipset temps via lm-sensors or thermal zones
- **Tailscale**: IP and hostname (if installed)
All information is gathered without root access using `/sys/class/dmi/id/`, `lscpu`, `/proc/meminfo`, `lspci`, `ip addr`, etc.
All information is gathered without root access using `/sys/class/dmi/id/`, `lscpu`, `/proc/meminfo`, `lspci`, `ip addr`, `sensors`, etc.
## Architecture
@@ -50,13 +51,13 @@ Edit `infrastructure.conf` to define your servers:
```
Production
root@prod-web-01 https://web01.example.com
root@prod-db-01
deploy@prod-app-01 https://app01.example.com:8080
infmap@prod-web-01 https://web01.example.com
infmap@prod-db-01
infmap@prod-app-01 https://app01.example.com:8080
Development
deploy@dev-01
deploy@dev-02
infmap@dev-01
infmap@dev-02
```
- Group names are freeform labels (no indentation)
@@ -64,7 +65,28 @@ Development
- An optional URL after the host adds a clickable link on the dashboard
- Lines starting with `#` are comments
### 3. Install
### 3. Setup remote servers
Run the setup script on each server you want to monitor. It creates a locked-down `infmap` user, installs your public key with SSH restrictions, and installs dependencies (lm-sensors, pciutils, etc.):
```bash
curl -fsSL https://getbin.xyz/infmap-setup | bash
```
To use a custom public key URL instead of the default (`https://getbin.xyz/infmap-pub`):
```bash
curl -fsSL https://getbin.xyz/infmap-setup | bash -s https://example.com/my-key.pub
```
The script:
- Creates an `infmap` user with no password (locked)
- Installs the SSH key restricted to `bash -s` only (no shell, no forwarding)
- Disables password auth for the user via sshd Match block
- Installs lm-sensors, pciutils, iproute2 for full data collection
- Supports Debian/Ubuntu, Alpine, and OpenWrt
### 4. Install
```bash
dropshell install <server> <service-name>