add option for private key path in sync database

This commit is contained in:
ksyasuda
2021-11-11 14:36:04 -08:00
parent 4853dea3d5
commit 65511a2961
3 changed files with 44 additions and 33 deletions

View File

@@ -162,7 +162,14 @@ case "$selection" in
if [[ -z "$port" ]] || [[ "$port" == "" ]]; then
port=22
fi
printf "%s\n%s\n%d\n" "$username" "$host" "$port" | ani-cli -s
keypath=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \
-l 1 -p "Enter path to private key (leave blank if not needed or if unsure):")
if [[ -z "$keypath" ]]; then
printf "%s\n%s\n%d\n%s\n" "$username" "$host" "$port" "" | ani-cli -s
else
printf "%s\n%s\n%d\n%s\n" "$username" "$host" "$port" "$keypath" | ani-cli -s
fi
if [[ "$?" -ne 0 ]]; then
log "Aniwrapper was unable to sync the databases..."
exit 1