Startup script
You can specify a script to run before a container or Python engine is started.
Configuration property | Default setting | Description |
---|---|---|
startup.hook.script
|
none | The path and name of a startup hook script
that runs before any container or
Python engine is started. This value can be
empty (for no script) or a relative path from
Spotfire Service for Python working directory.
Place the startup script in the directory with the custom.properties file (by default <server-installation-dir>/tomcat/spotfire-bin/config/root/conf/). Note: To specify
the path, you must use forward slash (/) regardless of the host operating
system.
Spotfire Service for Python can run either a .bat or a .sh file format, depending on host operating system. On a Linux® system, the script must have appropriate permissions before Spotfire Service for Python executes it. Important:
Remember that for any script you write, the line endings must be appropriate
for the operating system where the service runs. Many text editors can perform
end-of-line (EOL) conversion.
You can use the startup script to set environment variables, create directories, download files, or prepare the file system settings in other ways before the service starts. (For example, you can perform Docker commands in the script for a Linux deployment area, or you can run another script. See Containerized Service for more information.) |
Example
- Relative path for a Linux deployment area: conf/mystartupscript.sh
- Relative path for a Windows deployment area: conf/mystartupscript.bat