Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- settings="/home/t2ls/test_file.txt"
- lab63_enabled=false
- dialog --title "Do you want activate LAB-63-notify checkout to LIS?" --yesno "Activate LAB-63?" 10 60
- lab63_enabled="$?"
- if [["$lab63_enabled" -eq "0" ]; then
- lab63_enabled=true
- hl7_lab63_ext_address=$(dialog --title "Insert LIS ip" --stdout --inputbox "Enter LIS ip address" 10 60)
- echo ${hl7_lab63_ext_address}
- if [[ -z "$hl7_lab63_ext_address" ]]; then
- echo No address specified. Checkout notification will be disabled.
- lab63_enabled=false
- else
- hl7_lab63_ext_port=$(dialog --title "Insert LIS notification port" \
- --stdout --inputbox "Enter the port to which to notify LIS checkouts" 10 60)
- if [[ -z ${hl7_lab63_ext_port} ]]; then
- lab63_enabled=false
- echo No port specified. Checkout notification will be disabled.
- else
- echo saving configuration...
- fi
- fi
- else
- lab63_enabled=false
- fi
- sed -i -r -e "s/^hl7_lab63_enabled.*/hl7_lab63_enabled = $lab63_enabled/" "$settings"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement