summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-14 10:28:09 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-14 10:28:09 -0300
commitc03461f7ee7308d89b45c495c85512362e36433b (patch)
tree3b760de7fb5815300d66e21b03fbeedc1d835171
parent66812bcf7655bf22aafe58d8d60c96a03114bf0b (diff)
downloadkeyringer-c03461f7ee7308d89b45c495c85512362e36433b.tar.gz
keyringer-c03461f7ee7308d89b45c495c85512362e36433b.tar.bz2
Check if keyring exists
-rwxr-xr-xkeyringer6
1 files changed, 6 insertions, 0 deletions
diff --git a/keyringer b/keyringer
index 0930637..e57dfd0 100755
--- a/keyringer
+++ b/keyringer
@@ -161,6 +161,12 @@ fi
# Load functions
source "$LIB" || exit 1
+# Check if keyring exist
+if [ ! -f "$CONFIG_BASE/$KEYRING" ]; then
+ echo "No such keyring $KEYRING"
+ exit 1
+fi
+
# Setup main configuration and load preferences
keyringer_config_load