diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-05-12 17:45:45 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-05-12 17:45:45 -0300 |
commit | 4823190534e4825f9246b36a7f699fb02bd4723b (patch) | |
tree | 6ace04880511caf94d7d4ad7fb0eb3c3f3670d45 | |
parent | 7878c1ace67a28e823c7d7ea5cb158d5d051ae3f (diff) | |
download | hydra-4823190534e4825f9246b36a7f699fb02bd4723b.tar.gz hydra-4823190534e4825f9246b36a7f699fb02bd4723b.tar.bz2 |
Syntax check for eyaml
-rwxr-xr-x | share/hydra/eyaml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/share/hydra/eyaml b/share/hydra/eyaml index efd0c41..9e75133 100755 --- a/share/hydra/eyaml +++ b/share/hydra/eyaml @@ -21,10 +21,23 @@ source $APP_BASE/lib/hydra/functions || exit 1 hydra_config_load # Parameters +BASENAME="`basename $0`" NODE="$1" FQDN="`hydra_get_fqdn_from_nodename $NODE`" shift +# Check for eyaml +if ! which eyaml &> /dev/null; then + echo "Please install ruby-eyaml" + exit 1 +fi + +# Check for node +if [ -z "$NODE" ]; then + echo "usage: hydra $HYDRA $BASENAME <node> <opts>" + exit 1 +fi + # Ensure keystore exists mkdir -p $HYDRA_FOLDER/keys/$FQDN/eyaml |