Updated Administrating wildduck via command line (markdown)

bunyevacz 2018-06-23 09:38:39 +02:00
parent 5da1917931
commit 7ea3c7d2bb

@ -34,6 +34,26 @@ $ functionname myargument1 my2
If you save it to `~/.bashrc`, then you can call it as any `alias` defined there.
### Better to source our file in `.bashrc` rather then defining there
It is better to have a separate file for wildduck related commands, and
`source` it in `bashrc` file, then polluting too much it.
So we create a file named `~/.wildduck.commands`, and `source` it.
Paste this at the end of `~/.bashrc` file:
```
# include .wildduck.commands if it exists
if [ -f $HOME/.wildduck.commands ]; then
. $HOME/.wildduck.commands
echo ".wildduck.commands file has been sourced
fi
```
Please not, that `. file` is the same as `source file`. But dot itself is
POSIX compatible, while `source` is bash builtin (and some other shells too),
but bash itself [does not make a distinction between dot and source](https://stackoverflow.com/a/20094373).
# REST api
In the below examples, we are taking or commands from [wildduck API](https://api.wildduck.email/).