-
Notifications
You must be signed in to change notification settings - Fork 6
/
scripts.conf
23 lines (23 loc) · 1.24 KB
/
scripts.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Script config
#
# Edit this file to configure the use of scripts from REST API.
# Scripts should be placed in the 'scripts' directory and be runnable. Scripts are run as the 'polaric' user,
# and appropriate measures should be taken to give scripts the proper permissions. Scripts are expected to
# return a standard code where negative values is used to report an error.
#
# The return code is returned back to the client. If field 4 (return-stdout) is set to true, the text written
# by the script to stdout is returned to the client (after the code and a newline). If false, any text that
# scripts are writing to stdout or stderr are simply redirected to /var/log/polaric/scripts.log.
# If longrun is true the REST call will be returned immediately and the script will run in a background
# thread. When it finishes the user is notified through the notifier websocket.
#
# Scripts that are not returning within 10 seconds are killed. Longrun scripts are killed after 4 hours
# if they have not finished.
#
# To invoke a script use POST to <server-url>/scripts/<name>.
# Arguments are sent as JSON object: {"args" : list-of-strings}
#
# Format of config line: One line pr. script:
#
# name script number-of-args return-stdout longrun Description
#