diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-27 19:41:28 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-27 19:49:58 +0100 |
commit | 1e4a96730da70fcfa3b8c153874cbdebad0f9829 (patch) | |
tree | 9495f33f6b54621e0a684b553b64a6958744c1e3 /libexec/app-operate | |
parent | e1daac32c5b7ca0d902c16135d361aa5303f5124 (diff) | |
download | app.sh-1e4a96730da70fcfa3b8c153874cbdebad0f9829.tar.gz app.sh-1e4a96730da70fcfa3b8c153874cbdebad0f9829.tar.bz2 app.sh-1e4a96730da70fcfa3b8c153874cbdebad0f9829.tar.xz app.sh-1e4a96730da70fcfa3b8c153874cbdebad0f9829.zip |
o Starting on a style guide.
app-conf: Adding 'import' command.
app-cat-conf: Adding support for multiple -f flags. The default files
can be switched off.
A file named "-" is the same as /dev/stdin.
app: Adding a way to enable debugging.
app-install-file: Import any configuration delivered with the package.
Diffstat (limited to 'libexec/app-operate')
-rwxr-xr-x | libexec/app-operate | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/libexec/app-operate b/libexec/app-operate index 007948c..452f658 100755 --- a/libexec/app-operate +++ b/libexec/app-operate @@ -10,29 +10,16 @@ APPSH_HOME=$(cd $(dirname "$0")/.. && pwd) assert_is_app -method="$1" +method="$1"; shift +set -x -bin=`app-conf get app.method` -bin=${bin-$APPSH_HOME/.app/libexec/app-method-pid} +bin=`app-conf get app.operator` +bin=${bin:-$APPSH_HOME/libexec/app-operator-pid} -if [ ! -x "current/$bin" ] +if [ ! -x "$bin" ] then echo "Invalid executable: $bin" >&2 exit 1 fi -case "$method" in - start) run_app "$name" "$instance" "$bin" "start" "$@" ;; - stop) run_app "$name" "$instance" "$bin" "stop" "$@" ;; - status) run_app "$name" "$instance" "$bin" "status" "$@" ;; - restart) run_app "$name" "$instance" "$bin" "restart" "$@" ;; - run) run_app "$name" "$instance" "$bin" "run" "$@" ;; - *) - if [ -z "$method" ] - then - method_operate_usage - else - method_operate_usage "Unknown method $method" - fi - ;; -esac +run_app "$bin" "$@" |