fix db history sync

This commit is contained in:
ksyasuda 2021-11-20 13:07:47 -08:00
parent 7ee540601e
commit 737d066ced

View File

@ -204,32 +204,32 @@ case "$selection" in
;;
5.)
log "Sync history database"
# username=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \
# -l 1 -p "Enter the username of the remote user:")
# if [[ -z "$username" ]] || [[ "$username" == "" ]]; then
# log "No username provided... exiting"
# exit 1
# fi
# host=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \
# -l 1 -p "Enter the host for the remote machine (eg 192.168.1.99):")
# if [[ -z "$host" ]] || [[ "$host" == "" ]]; then
# log "No host provided... exiting"
# exit 1
# fi
# port=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \
# -l 1 -p "Enter in the ssh port for remote machine or leave blank for default [22]:")
# if [[ -z "$port" ]] || [[ "$port" == "" ]]; then
# port=22
# fi
# keypath=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \
# -l 1 -p "Enter path to private key (leave blank if not needed or if unsure):")
username=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \
-l 1 -p "Enter the username of the remote user:")
if [[ -z "$username" ]] || [[ "$username" == "" ]]; then
log "No username provided... exiting"
exit 1
fi
host=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \
-l 1 -p "Enter the host for the remote machine (eg 192.168.1.99):")
if [[ -z "$host" ]] || [[ "$host" == "" ]]; then
log "No host provided... exiting"
exit 1
fi
port=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \
-l 1 -p "Enter in the ssh port for remote machine or leave blank for default [22]:")
if [[ -z "$port" ]] || [[ "$port" == "" ]]; then
port=22
fi
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
printf "%s\n%s\n%d\n%s\n" "sudacode" "sudacode" 3005 "" | ani-cli -s
# 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