Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 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" ]; then
  9. lab63_enabled=true
  10. hl7_lab63_ext_address=$(dialog --title "Insert LIS ip" --stdout --inputbox "Enter LIS ip address" 10 60)
  11. echo ${hl7_lab63_ext_address}
  12.  
  13. if [[ -z "$hl7_lab63_ext_address" ]]; then
  14. echo No address specified. Checkout notification will be disabled.
  15. lab63_enabled=false
  16. else
  17. hl7_lab63_ext_port=$(dialog --title "Insert LIS notification port" \
  18. --stdout --inputbox "Enter the port to which to notify LIS checkouts" 10 60)
  19. if [[ -z ${hl7_lab63_ext_port} ]]; then
  20. lab63_enabled=false
  21. echo No port specified. Checkout notification will be disabled.
  22. else
  23. echo saving configuration...
  24. fi
  25. fi
  26. else
  27. lab63_enabled=false
  28. fi
  29. sed -i -r -e "s/^hl7_lab63_enabled.*/hl7_lab63_enabled = $lab63_enabled/" "$settings"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement