mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
geoserver: fix startup script
Set GEOSERVER_DATA_DIR to current working directory if not provided.
This commit is contained in:
parent
867939d701
commit
9f98f2904b
18
pkgs/servers/geospatial/geoserver/data-dir.patch
Normal file
18
pkgs/servers/geospatial/geoserver/data-dir.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- a/bin/startup.sh
|
||||
+++ b/bin/startup.sh
|
||||
@@ -66,12 +66,9 @@ fi
|
||||
|
||||
#Find the configuration directory: GEOSERVER_DATA_DIR
|
||||
if [ -z "${GEOSERVER_DATA_DIR:-}" ]; then
|
||||
- if [ -r "${GEOSERVER_HOME}/data_dir" ]; then
|
||||
- export GEOSERVER_DATA_DIR="${GEOSERVER_HOME}/data_dir"
|
||||
- else
|
||||
- echo "No GEOSERVER_DATA_DIR found, using application defaults"
|
||||
- GEOSERVER_DATA_DIR=""
|
||||
- fi
|
||||
+ echo "GEOSERVER_DATA_DIR is not provided. Using $(pwd)/geoserver/data_dir directory"
|
||||
+ mkdir -p "$(pwd)"/geoserver/data_dir
|
||||
+ GEOSERVER_DATA_DIR="$(pwd)/geoserver/data_dir"
|
||||
fi
|
||||
|
||||
cd "${GEOSERVER_HOME}" || exit 1
|
@ -9,6 +9,11 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-xX1rAONMh5XSWGPXkVMemAvG34DDNmu2018HsTvY7G0=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# set GEOSERVER_DATA_DIR to current working directory if not provided
|
||||
./data-dir.patch
|
||||
];
|
||||
|
||||
sourceRoot = ".";
|
||||
nativeBuildInputs = [ unzip makeWrapper ];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user