Advertisement
Guest User

Untitled

a guest
Dec 21st, 2018
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. + dbtype=rm
  2. + olddbip=192.168.1.128
  3. + olduser=userpass
  4. + oldpass=userpass
  5. + olddbname=DB
  6. + oldport=3306
  7. + madconf=configs/config.ini
  8. + [[ -f configs/config.ini ]]
  9. ++ awk -F: '/^dbip/{print $2}' configs/config.ini
  10. ++ awk -F# '{print $1}'
  11. ++ sed -e 's,[[:space:]]*$,,' -e 's,^[[:space:]]*,,'
  12. + dbip=192.168.1.128
  13. ++ awk -F: '/^dbusername/{print $2}' configs/config.ini
  14. ++ sed -e 's,[[:space:]]*$,,' -e 's,^[[:space:]]*,,'
  15. ++ awk -F# '{print $1}'
  16. + user=userpass
  17. ++ awk -F: '/^dbpassword/{print $2}' configs/config.ini
  18. ++ sed -e 's,[[:space:]]*$,,' -e 's,^[[:space:]]*,,'
  19. ++ awk -F# '{print $1}'
  20. + pass=userpass
  21. ++ awk -F: '/^dbname/{print $2}' configs/config.ini
  22. ++ awk -F# '{print $1}'
  23. ++ sed -e 's,[[:space:]]*$,,' -e 's,^[[:space:]]*,,'
  24. + dbname=DB
  25. ++ awk -F: '/^dbport/{print $2}' configs/config.ini
  26. ++ awk -F# '{print $1}'
  27. ++ sed -e 's,[[:space:]]*$,,' -e 's,^[[:space:]]*,,'
  28. + port=
  29. + [[ userpass == '' ]]
  30. + [[ '' == '' ]]
  31. + port=3306
  32. + case "$dbtype" in
  33. + import_rm
  34. + read -r spawn_id lat lon old _
  35. ++ oldquery 'select distinct spawnpoint.id, spawnpoint.latitude, spawnpoint.longitude, max(spawnpointdetectiondata.tth_secs) from spawnpoint join spawnpointdetectiondata on spawnpoint.id=spawnpointdetectiondata.spawnpoint_id'
  36. ++ /usr/bin/mysql -N -B -u userpass -D DB -puserpass -h 192.168.1.128 -P 3306 -e 'select distinct spawnpoint.id, spawnpoint.latitude, spawnpoint.longitude, max(spawnpointdetectiondata.tth_secs) from spawnpoint join spawnpointdetectiondata on spawnpoint.id=spawnpointdetectiondata.spawnpoint_id'
  37. mysql: [Warning] Using a password on the command line interface can be insecure.
  38. + spawn_exists
  39. + read -r spawnpoint endtime _
  40. ++ query 'select spawnpoint, calc_endminsec from trs_spawn where spawnpoint='\''9355946000805'\'''
  41. ++ /usr/bin/mysql -N -B -u userpass -D DB -puserpass -h 192.168.1.128 -P 3306 -e 'select spawnpoint, calc_endminsec from trs_spawn where spawnpoint='\''9355946000805'\'''
  42. mysql: [Warning] Using a password on the command line interface can be insecure.
  43. + [[ -n 9355946000805 ]]
  44. + [[ 50:53 == \N\U\L\L ]]
  45. + echo 'spawn 9355946000805 already exists in the db'
  46. + return 69
  47. + continue
  48. + read -r spawn_id lat lon old _
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement