diff --git a/elements/os-svc-install/README.md b/elements/os-svc-install/README.md index 4a29d4a04..5ab412420 100644 --- a/elements/os-svc-install/README.md +++ b/elements/os-svc-install/README.md @@ -23,7 +23,7 @@ service will not be started automatically nor can it be manually started. ## example usage ```bash # clone nova.git from github, and install it and its dependencies to /opt/stack/venvs/nova -os-svc-install -u nova -n nova-all -c 'nova-all --someoption' -r https://github.com/openstack/nova.git +os-svc-install -u nova -r https://github.com/openstack/nova.git # install a system-start script for nova-api os-svc-daemon -e 'foo=bar bar=baz' -n nova-api -u nova -c /opt/stack/venvs/nova/bin/nova-api -- --config-dir /etc/nova diff --git a/elements/os-svc-install/bin/os-svc-install b/elements/os-svc-install/bin/os-svc-install index ae0c97305..a0226cb14 100755 --- a/elements/os-svc-install/bin/os-svc-install +++ b/elements/os-svc-install/bin/os-svc-install @@ -89,16 +89,18 @@ function usage() { echo " -r service's git repo url" echo " -b repo branch or ref (default 'master')" echo " -u name of the service run-as user" - exit 0 } -while getopts r:u:c:n:h:b: opt; do +user= +repo= +while getopts hr:u:b: opt; do case "$opt" in u) user=$OPTARG;; - h) usage;; + h) usage; exit 0;; r) repo=$OPTARG;; b) branch=$OPTARG;; - \?) usage;; + \?) usage; exit 1;; + :) usage; exit 1;; esac done