Skip to content

Commit f13cdfc

Browse files
committed
Make README.md follow GitLab markdown flavor and improve texts
1 parent e0c0460 commit f13cdfc

File tree

1 file changed

+34
-22
lines changed

1 file changed

+34
-22
lines changed

remoting_client/cli/README.md

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,50 @@
1-
# Project Title
1+
# ISPConfig CLI
22
Command line for ISPConfig remote user REST API using either smart functions or raw methods.
33

44
## Getting Started
55
This tool can be used and packaged stand alone, without ISPConfig itself. It is designed to have as few dependencies as possible.
66

7-
The script has two main modes: method wrapping and functions. Method wrapping already works nicely, and simply makes properly formatted requests with curl,
8-
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
9-
to understand JSON.
7+
The script has two main modes: smart functions and raw methods.
108

11-
If you want to script using functions, consider using -q.
9+
Raw methods simply wrap your JSON to the arbitrary method name you've given. As such, it works with any method, and makes properly formatted requests with curl. It is a handy tool for custom requests, testing, advanced scripting and integration work.
1210

13-
Example method:
14-
ispconfig-cli -m login -j credentials.json
15-
{"code":"ok","message":"","response":"dc39619b0ac9694cb85e93d8b3ac8258"}
11+
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. This is handy for manual interaction or for scripting.
1612

17-
Example function:
18-
ispconfig-cli -f "dns_a_add example.com. www 192.168.0.2"
19-
DNS zone example.com. has id 1.
20-
DNS A www exists with id 228, updating...
21-
Updated records: 1
13+
> **Note:**
14+
Consider using -q for scripting, this will suppress everything but results and errors on the output.
2215

23-
The script uses an optional config file, making commands short as above.
16+
### Example function usage:
17+
ispconfig-cli -f "dns_a_add example.com. www 192.168.0.2"
18+
19+
DNS zone example.com. has id 1.
20+
DNS A www exists with id 228, updating...
21+
Updated records: 1
22+
23+
### Example method usage:
24+
ispconfig-cli -m login -j credentials.json
25+
26+
{"code":"ok","message":"","response":"dc39619b0ac9694cb85e93d8b3ac8258"}
27+
28+
> **Note:**
29+
The whole function has to be quoted as one due to how bash manages the command line arguments.
30+
31+
### Config file
32+
The script uses an optional config file, allowing commands as short as above.
2433

2534
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
2635
notes on how to deploy the project on a live system.
2736

28-
### Dependencies
29-
1) jq
30-
2) curl
37+
## Dependencies
38+
- ```jq``` for working with JSON
39+
- ```curl``` for talking to the endpoint
40+
41+
On debian-based distributions such as ubuntu, you can ensure these are installed by running
42+
sudo apt install jq curl
3143

32-
### Installing
33-
1) Place this script in your path, for example in your ~/bin folder on many distros.
34-
2) Make it executable ```chmod 755 ispconfig-cli```
35-
3) Optionally create a config file in /etc/ispconfig-cli.conf or ~/.ispconfig-cli
44+
## Installing
45+
1. Place this script in your path, for example in your ```~/bin``` folder on many distros.
46+
2. Make it executable ```chmod 755 ispconfig-cli```
47+
3. Optionally create a config file in ```/etc/ispconfig-cli.conf``` or ```~/.ispconfig-cli```
3648

3749
## Details on usage
38-
Run the script without arguments for the full list of functionality and config file creation.
50+
Run the script without arguments for the full list of functionality and config file creation instructions.

0 commit comments

Comments
 (0)