fix: ensure we create the config directory
This commit is contained in:
@@ -328,6 +328,7 @@ service_linked_apps() {
|
|||||||
local SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE"
|
local SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE"
|
||||||
local LINKS_FILE="$SERVICE_ROOT/LINKS"
|
local LINKS_FILE="$SERVICE_ROOT/LINKS"
|
||||||
|
|
||||||
|
touch "$LINKS_FILE"
|
||||||
[[ -z $(< "$LINKS_FILE") ]] && echo '-' && return 0
|
[[ -z $(< "$LINKS_FILE") ]] && echo '-' && return 0
|
||||||
|
|
||||||
tr '\n' ' ' < "$LINKS_FILE"
|
tr '\n' ' ' < "$LINKS_FILE"
|
||||||
|
|||||||
2
config
2
config
@@ -4,7 +4,7 @@ export POSTGRES_IMAGE_VERSION=${POSTGRES_IMAGE_VERSION:="9.6.4"}
|
|||||||
export POSTGRES_ROOT=${POSTGRES_ROOT:="/var/lib/dokku/services/postgres"}
|
export POSTGRES_ROOT=${POSTGRES_ROOT:="/var/lib/dokku/services/postgres"}
|
||||||
|
|
||||||
export PLUGIN_COMMAND_PREFIX="postgres"
|
export PLUGIN_COMMAND_PREFIX="postgres"
|
||||||
export PLUGIN_CONFIG_ROOT="${DOKKU_LIB_ROOT}/config/${PLUGIN_COMMAND_PREFIX}"
|
export PLUGIN_CONFIG_ROOT=${PLUGIN_CONFIG_ROOT:="$DOKKU_LIB_ROOT/config/$PLUGIN_COMMAND_PREFIX"}
|
||||||
export PLUGIN_DATA_ROOT=$POSTGRES_ROOT
|
export PLUGIN_DATA_ROOT=$POSTGRES_ROOT
|
||||||
export PLUGIN_DATASTORE_PORTS=(5432)
|
export PLUGIN_DATASTORE_PORTS=(5432)
|
||||||
export PLUGIN_DATASTORE_WAIT_PORT=5432
|
export PLUGIN_DATASTORE_WAIT_PORT=5432
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ export PLUGIN_AVAILABLE_PATH="$PLUGIN_PATH"
|
|||||||
export PLUGIN_CORE_AVAILABLE_PATH="$PLUGIN_PATH"
|
export PLUGIN_CORE_AVAILABLE_PATH="$PLUGIN_PATH"
|
||||||
export POSTGRES_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/fixtures"
|
export POSTGRES_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/fixtures"
|
||||||
export PLUGIN_DATA_ROOT="$POSTGRES_ROOT"
|
export PLUGIN_DATA_ROOT="$POSTGRES_ROOT"
|
||||||
|
export PLUGIN_CONFIG_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/config"
|
||||||
if [[ "$(uname)" == "Darwin" ]]; then
|
if [[ "$(uname)" == "Darwin" ]]; then
|
||||||
export PLUGN_URL="https://github.com/dokku/plugn/releases/download/v0.3.0/plugn_0.3.0_darwin_x86_64.tgz"
|
export PLUGN_URL="https://github.com/dokku/plugn/releases/download/v0.3.0/plugn_0.3.0_darwin_x86_64.tgz"
|
||||||
else
|
else
|
||||||
@@ -19,6 +20,9 @@ fi
|
|||||||
mkdir -p "$PLUGIN_DATA_ROOT"
|
mkdir -p "$PLUGIN_DATA_ROOT"
|
||||||
rm -rf "${PLUGIN_DATA_ROOT:?}"/*
|
rm -rf "${PLUGIN_DATA_ROOT:?}"/*
|
||||||
|
|
||||||
|
mkdir -p "$PLUGIN_CONFIG_ROOT"
|
||||||
|
rm -rf "${PLUGIN_CONFIG_ROOT:?}"/*
|
||||||
|
|
||||||
flunk() {
|
flunk() {
|
||||||
{ if [ "$#" -eq 0 ]; then cat -
|
{ if [ "$#" -eq 0 ]; then cat -
|
||||||
else echo "$*"
|
else echo "$*"
|
||||||
|
|||||||
Reference in New Issue
Block a user