daily pastebin goal
2%
SHARE
TWEET

Untitled

a guest Mar 25th, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env bash
  2. settings="/home/t2ls/test_file.txt"
  3. lab63_enabled=false
  4. dialog --title "Do you want activate LAB-63-notify checkout to LIS?" \
  5. --yesno "Activate LAB-63?" 10 60
  6. lab63_enabled="$?"
  7. if [ "$lab63_enabled" -eq  "0" ]
  8. then
  9. lab63_enabled=true
  10. hl7_lab63_ext_address=$(dialog --title "Insert LIS ip" \
  11. --stdout \
  12. --inputbox "Enter LIS ip address" 10 60)
  13. echo $hl7_lab63_ext_address
  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 \
  21. --inputbox "Enter the port to which to notify LIS checkouts" 10 60)
  22. if [[ -z $hl7_lab63_ext_port ]]
  23. then
  24. lab63_enabled=false
  25. echo No port specified. Checkout notification will be disabled.
  26. else
  27. echo saving configuration...
  28. fi
  29. fi
  30. else
  31. lab63_enabled=false
  32. fi
  33. sed -i -r -e "s/^hl7_lab63_enabled.*/hl7_lab63_enabled = $lab63_enabled/" "$settings"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top