From 8e64eff782aa9d695afc6ee92f4f428c33ec8d23 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 23 Dec 2012 17:35:06 +0100 Subject: o Moving config.properties to etc/ to make it more app.sh compatible. --- src/main/unix/files/root/bin/method | 37 +++++++++++++++++++++++++++++++++ src/main/unix/files/scripts/postinstall | 3 +++ 2 files changed, 40 insertions(+) create mode 100644 src/main/unix/files/root/bin/method create mode 100644 src/main/unix/files/scripts/postinstall (limited to 'src/main/unix/files') 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 -- cgit v1.2.3