#-------------------------------------------------------------
local -i return_code=0
+ local answer
if [ ! -d "$LIST_PATH" ]; then
if mkdir "$LIST_PATH"; then # || (echo "$(basename $0): error creating $LIST_PATH: installation aborted"; exit 1)
echo "Creating list config file and will ask some questions."
+ # TODO: try to create $LIST_HOMEDIR
read -rep " List keyring location: ("$LIST_PATH") " LIST_HOMEDIR
LIST_HOMEDIR=${LIST_HOMEDIR:-"$LIST_PATH"}
read -rep " List description (optional): " DESCRIPTION
read -resp " Passphrase to protect the list's secret key: " PASSPHRASE
- # TODO: key specs (size, expiry date...)
+ # TODO: automatically create a passphrase
+ # TODO: key specs: size, expiry date...
+ # TODO: CheckValidEmail $LIST_ADDRESS...
+ # TODO: for admin in $LIST_ADMIN; do CheckValidEmail $admin...
echo "Creating your config..."
touch $LIST_CONFIG_FILE
EOF
- # TODO: import admin pubkey and send list pubkey to admin
+ while true; do
+ read -rep " Send list public key to list admins? (Y/n) " answer
+ answer="`echo $answer | tr '[:lower:]' '[:upper:]'`"
+ if [ "$answer" == "Y" ] || [ "$answer" == "YES" ]; then
+ SendListPubkey $LIST_ADMIN
+ break
+ elif [ "$answer" == "N" ] || [ "$answer" == "NO" ]; then
+ echo " Not sending public key from list to admins. Do it manually."
+ break
+ else
+ echo " Please answer either yes or no."
+ fi
+ done
+
chown -R $FIRMA_USER.$FIRMA_GROUP $LIST_HOMEDIR
else