Commit 8285eac1 authored by Johan Ehnberg's avatar Johan Ehnberg

Add CLI tool

parent 7873050d
# Project Title
Command line for ISPConfig remote user REST API using either smart functions or raw methods.
## Getting Started
This tool can be used and packaged stand alone, without ISPConfig itself. It is designed to have as few dependencies as possible.
The script has two main modes: method wrapping and functions. Method wrapping already works nicely, and simply makes properly formatted requests with curl,
making it a handy tool for custom requests, testing, automation and scripting. Functions in turn are combinations of methods and checks that act more like an intelligent tool and does not require the user
to understand JSON.
If you want to script using functions, consider using -q.
Example method:
ispconfig-cli -m login -j credentials.json
Example function:
ispconfig-cli -f "dns_a_add www"
DNS zone has id 1.
DNS A www exists with id 228, updating...
Updated records: 1
The script uses an optional config file, making commands short as above.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for
notes on how to deploy the project on a live system.
### Dependencies
1) jq
2) curl
### Installing
1) Place this script in your path, for example in your ~/bin folder on many distros.
2) Make it executable ```chmod 755 ispconfig-cli```
3) Optionally create a config file in /etc/ispconfig-cli.conf or ~/.ispconfig-cli
## Details on usage
Run the script without arguments for the full list of functionality and config file creation.
This diff is collapsed.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment