Dropshell basic templates (WIP)
This commit is contained in:
19
simple-object-storage/ports.sh
Normal file
19
simple-object-storage/ports.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/_common.sh"
|
||||
_check_required_env_vars "CONFIG_PATH"
|
||||
|
||||
# PORT SCRIPT
|
||||
# The port script is OPTIONAL.
|
||||
# It is used to return the ports used by the service.
|
||||
# It is called with the path to the server specific env file as an argument.
|
||||
|
||||
|
||||
# Required environment variables
|
||||
|
||||
# determine port.
|
||||
command -v jq &> /dev/null || _die "jq could not be found, please install it"
|
||||
[ -f "${CONFIG_PATH}/sos_config.json" ] || _die "sos_config.json does not exist"
|
||||
PORT=$(jq -r '.port' "${CONFIG_PATH}/sos_config.json")
|
||||
|
||||
echo $PORT
|
||||
|
Reference in New Issue
Block a user