copy-update-json.sh¶
Copies a module JSON file to the config directory and optionally updates fields.
Usage¶
Parameters¶
| Parameter | Description | Example |
|---|---|---|
module-name | Name of the module | identity |
--<field> <value> | Set JSON field to value (repeatable) | --node "tappaas2" |
Examples¶
# Copy identity.json with default values
copy-update-json.sh identity
# Copy and modify fields
copy-update-json.sh identity --node "tappaas2" --cores 4
copy-update-json.sh nextcloud --memory 4096 --zone0 "trusted"
What it does¶
- Copies
./<module>.jsonfrom current directory to/home/tappaas/config/ - Automatically sets the
locationfield to the module directory - Validates field names against
module-fields.jsonschema - Applies
--<field> <value>modifications to the copied JSON - Creates a
.origbackup if modifications are made - Validates the resulting JSON is valid
Notes¶
- Integer fields (per schema) are stored as JSON numbers
- String fields are stored as JSON strings
- Unknown field names will cause an error
See Also¶
- common-install-routines.sh - Shared library functions
- Module Definition - Module JSON fields