Files
2026-01-28 14:25:06 -08:00

80 lines
2.6 KiB
Markdown

# Qortal DevNet Scripts
This directory contains scripts for managing a Qortal DevNet node.
## Scripts
### `start.sh`
The original script to start a Qortal DevNet node. It:
- Validates Java installation and version
- Starts the Qortal node with appropriate JVM settings
### `start-with-validation.sh` (NEW)
An enhanced version of `start.sh` that includes automatic validation and updating of the `qortal.jar` file.
**Features:**
- Validates Java installation and version (same as original)
- Checks if `qortal.jar` exists locally
- Downloads `hash.txt` from the cloud storage for validation
- Generates MD5 checksum of the local `qortal.jar`
- Compares the local checksum with the expected checksum
- If the hashes don't match, automatically downloads the latest `qortal.jar`
- Starts the Qortal node with the same settings as the original script
**Usage:**
```bash
./start-with-validation.sh
```
**Benefits:**
- Ensures you're always running the latest DevNet version
- No manual downloads required
- Automatic updates when new versions are available
- Same safety checks as the original script
### `start-mac.sh` / `start-windows.ps1` (NEW)
Mac and Windows variants of `start-with-validation.sh` with the same validation and update behavior.
### `stop.sh` / `stop-mac.sh` / `stop-windows.ps1` (NEW)
Gracefully stops a running Qortal node via the API or by terminating the process.
### `setup-dependencies*.{sh,ps1}` (NEW)
Dependency installers for the setup scripts. The setup scripts will download and run these automatically if required tools are missing.
### `add-public-ip-to-settings.sh` (NEW)
A script to add your public IP address to the `settings.json` file for network connectivity.
**Features:**
- Downloads default `settings.json` if not present
- Obtains your public IP address from canhazip.com
- Adds your IP with port 22392 to the `fixedNetwork` section
- Works with or without `jq` installed
- Validates IP address format
**Usage:**
```bash
./add-public-ip-to-settings.sh
```
**When to use:**
- When setting up a new Qortal node
- When you need to update your public IP in the network
- If Qortal fails to connect to the network
**Note:** This script should be run before starting Qortal, or after stopping it.
## Usage Notes
1. Both scripts must be run as a non-root user for security reasons
2. Java 11 or greater is required
3. The scripts will create:
- `run.log` - contains the output from the Qortal node
- `run.pid` - contains the process ID of the running node
## Troubleshooting
If you encounter issues:
- Check `run.log` for error messages
- Ensure you have `wget` or `curl` installed for downloading files
- Verify Java is properly installed: `java -version`