Messages when adding tahoelafs server

This commit is contained in:
Bob Mottram 2017-03-07 15:16:45 +00:00
parent 1d868312e0
commit df259331b8
1 changed files with 5 additions and 0 deletions

View File

@ -476,15 +476,19 @@ function add_tahoelafs_server {
furl="$4"
if [ ${#storage_hostname} -eq 0 ]; then
echo $'No storage hostname'
return
fi
if [ ${#public_key} -eq 0 ]; then
echo $'No public key'
return
fi
if [ ${#nick} -eq 0 ]; then
echo $'No nick'
return
fi
if [ ${#furl} -eq 0 ]; then
echo $'No furl'
return
fi
@ -492,6 +496,7 @@ function add_tahoelafs_server {
echo 'storage:' > ${tahoelafs_storage_file}
else
if grep -q "${public_key}" ${tahoelafs_storage_file}; then
echo $'Public key already exists'
return
fi
echo '# storage' >> ${tahoelafs_storage_file}