Merge pull request #1985 from nextcloud/docs/1800/more-hints-for-absolute-paths

More hints for absolute paths
This commit is contained in:
Joas Schilling 2019-07-12 12:54:18 +02:00 committed by GitHub
commit a9becdb7d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 3 deletions

View file

@ -15,7 +15,7 @@ Argument | Allowed chars | Description
---|---|---
`cmd` | [a-z0-9] | The keyword the user has to type to run this command (min. 1, max. 64 characters)
`name` | * | The author name of the response that is posted by the command (min. 1, max. 64 characters)
`script` | * | Actual command that is being ran. The script must be executable by the user of your webserver. See the parameter table below for options. The script is invoked with `--help` as argument on set up, to check if it can be executed correctly.
`script` | * | Actual command that is being ran. The script must be executable by the user of your webserver and has to use absolute paths only! See the parameter table below for options. The script is invoked with `--help` as argument on set up, to check if it can be executed correctly.
`response` | 0-2 | Who should see the response: 0 - No one, 1 - User who executed the command, 2 - Everyone
`enabled` | 0-3 | Who can use the command: 0 - No one, 1 - Moderators of the room, 2 - Logged in users, 3 - Everyone
@ -58,6 +58,9 @@ It should return a useful description, the first line is also displayed in a lis
### Register command
Make sure to use the absolute path to your script when registering the command:
```
./occ talk:command:add calculator calculator "/path/to/calc.sh \"{ARGUMENTS_DOUBLEQUOTE_ESCAPED}\" {ROOM} {USER}" 1 3
```

View file

@ -18,6 +18,7 @@ title: Constants
* `3` user
* `4` guest
* `5` user following a public link
* `6` guest with moderator permissions
## Actor types of chat messages
* `guests` - guest users

View file

@ -57,7 +57,7 @@ class Add extends Base {
->addArgument(
'script',
InputArgument::REQUIRED,
'Script to execute'
'Script to execute (Must be using absolute paths only)'
)
->addArgument(
'response',

View file

@ -62,7 +62,7 @@ class Update extends Base {
->addArgument(
'script',
InputArgument::REQUIRED,
'Script to execute'
'Script to execute (Must be using absolute paths only)'
)
->addArgument(
'response',