Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. settings="/home/t2ls/test_file.txt"
  3. lab63_enabled=false
  4.  
  5. dialog --title "Do you want activate LAB-63-notify checkout to LIS?" --yesno "Activate LAB-63?" 10 60
  6. lab63_enabled="$?"
  7.  
  8. if [["$lab63_enabled" -eq "0" ];
  9. then
  10. lab63_enabled=true
  11. hl7_lab63_ext_address=$(dialog --title "Insert LIS ip" --stdout --inputbox "Enter LIS ip address" 10 60)
  12. echo ${hl7_lab63_ext_address}
  13.  
  14. if [[ -z "$hl7_lab63_ext_address" ]];
  15. then
  16. echo No address specified. Checkout notification will be disabled.
  17. lab63_enabled=false
  18. else
  19. hl7_lab63_ext_port=$(dialog --title "Insert LIS notification port" \
  20. --stdout --inputbox "Enter the port to which to notify LIS checkouts" 10 60)
  21. if [[ -z ${hl7_lab63_ext_port} ]];
  22. then
  23. lab63_enabled=false
  24. echo No port specified. Checkout notification will be disabled.
  25. else
  26. echo saving configuration...
  27. fi
  28. fi
  29. else
  30. lab63_enabled=false
  31. fi
  32. sed -i -r -e "s/^hl7_lab63_enabled.*/hl7_lab63_enabled = $lab63_enabled/" "$settings"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement