aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/trygvis/esper/testing/Config.java2
-rw-r--r--src/main/unix/files/root/bin/method37
-rw-r--r--src/main/unix/files/scripts/postinstall3
3 files changed, 41 insertions, 1 deletions
diff --git a/src/main/java/io/trygvis/esper/testing/Config.java b/src/main/java/io/trygvis/esper/testing/Config.java
index c080a0b..13ef1cd 100644
--- a/src/main/java/io/trygvis/esper/testing/Config.java
+++ b/src/main/java/io/trygvis/esper/testing/Config.java
@@ -64,7 +64,7 @@ public class Config {
initLogging();
Properties properties = new Properties();
- try (FileInputStream inputStream = new FileInputStream("config.properties")) {
+ try (FileInputStream inputStream = new FileInputStream("etc/config.properties")) {
properties.load(inputStream);
}
diff --git a/src/main/unix/files/root/bin/method b/src/main/unix/files/root/bin/method
new file mode 100644
index 0000000..a6f1a2b
--- /dev/null
+++ b/src/main/unix/files/root/bin/method
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. $APPSH_HOME/.app/lib/app-common
+
+method=$APPSH_METHOD
+
+if [ -z "$1" ]
+then
+ echo "Missing required argument: app" >&2
+ exit 1
+fi
+
+app=$1
+shift
+
+run() {
+ app=$1; shift
+
+ if [ ! -x bin/$app ]
+ then
+ echo "Unknown app: $app" >&2
+ exit 1
+ fi
+
+ exec "bin/$app" "$@"
+}
+
+case "$method" in
+ run)
+ run "$app" "$@"
+ ;;
+ *)
+ echo "Unknown method: $method" >&2
+ exit 1
+ ;;
+esac
+exit $?
diff --git a/src/main/unix/files/scripts/postinstall b/src/main/unix/files/scripts/postinstall
new file mode 100644
index 0000000..07b1abc
--- /dev/null
+++ b/src/main/unix/files/scripts/postinstall
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+ln -s ../../../etc