Skip to content
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.

Latest commit

 

History

History
83 lines (54 loc) · 2.58 KB

help.md

File metadata and controls

83 lines (54 loc) · 2.58 KB

##Usage

hookserver <command> [<subcommand>] [<value1>] [<value2>] [options]

##Commands

###add hook <name> <scriptPath> Register a named webhook.

name: Name of the hook.
scriptPath: File path pointing to a bash script to be executed when the webhook is triggered.

###add key [<key>] [-l] Register a new security key and save its md5 hash. This key allows access to any registered webhook on this server. You can use multiple keys at the same time.

key: The key itself. If not provided, a random-generated key will be added and displayed.

-l, --length: If no key provided, you can set the length of the random-generated key with this option.

###update hook <name> <scriptPath> Update a previously registered webhook.

name: Name of the hook.
scriptPath: File path pointing to the new bash script to be executed when the webhook is triggered.

###update key <currentKey> <newKey> Update a previously registered security key.

currentKey: The key to be updated.
newKey: The new key replacing the current one.

###remove hook <name> Unregister a previously added webhook.

name: Name of the hook.

###remove key <key> Drop a previously added security key.

key: The key to be dropped.

###list hooks Display a list of registered webhooks.

###list keys Display a list of stored md5 hashes generated from security keys.

###run <hookName>
Trigger a webhook from commandline.

hookName: Name of the hook to run.

###start [-d] [-p] [-l] Start up the webhook http server.

-d, --daemonize: This option allows you to run the server in the background detached from this shell.
-p, --port: Overwrite default port (6086).
-l, --log: If running deamonized, you can set the log path of the server with this flag.

###stop [-f] Stop server daemon.

-f, --force: Set this option to avoid waiting the server to close its open connections and stop it immediately.

###cleanup Delete all the registered hooks and keys.
Warning: this action cannot be undone.

###version Show Hookserver version number.

###help Show this help.

##Options:

###-v, --version
Set this option without any command or subcommand to display Hookserver version number.

###-h, --help
Set this option without any command or subcommand to display this help.