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.) 5.)
log "Sync history database" log "Sync history database"
# username=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \ username=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \
# -l 1 -p "Enter the username of the remote user:") -l 1 -p "Enter the username of the remote user:")
# if [[ -z "$username" ]] || [[ "$username" == "" ]]; then if [[ -z "$username" ]] || [[ "$username" == "" ]]; then
# log "No username provided... exiting" log "No username provided... exiting"
# exit 1 exit 1
# fi fi
# host=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \ host=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \
# -l 1 -p "Enter the host for the remote machine (eg 192.168.1.99):") -l 1 -p "Enter the host for the remote machine (eg 192.168.1.99):")
# if [[ -z "$host" ]] || [[ "$host" == "" ]]; then if [[ -z "$host" ]] || [[ "$host" == "" ]]; then
# log "No host provided... exiting" log "No host provided... exiting"
# exit 1 exit 1
# fi fi
# port=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \ 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]:") -l 1 -p "Enter in the ssh port for remote machine or leave blank for default [22]:")
# if [[ -z "$port" ]] || [[ "$port" == "" ]]; then if [[ -z "$port" ]] || [[ "$port" == "" ]]; then
# port=22 port=22
# fi fi
# keypath=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \ keypath=$(rofi -dmenu -config "$CFG_DIR/$CFG_FILE" \
# -l 1 -p "Enter path to private key (leave blank if not needed or if unsure):") -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 if [[ "$?" -ne 0 ]]; then
log "Aniwrapper was unable to sync the databases..." log "Aniwrapper was unable to sync the databases..."
exit 1 exit 1