github.com/mysteriumnetwork/node@v0.0.0-20240516044423-365054f76801/bin/package/installation/pre-install.sh (about)

     1  #!/bin/sh -e
     2  
     3  # Source debconf library.
     4  . /usr/share/debconf/confmodule
     5  
     6  db_input critical mysterium/terms || true
     7  db_go
     8  
     9  # to reset accepted terms:
    10  # echo RESET mysterium/accept_terms | debconf-communicate mysterium-node
    11  # or:
    12  # NOTE: uncomment below if you need to ask user to accepted updated terms again
    13  # db_fset mysterium/accept_terms seen false
    14  
    15  db_input critical mysterium/accept_terms || true
    16  db_go
    17  
    18  # Check their answer.
    19  db_get mysterium/accept_terms
    20  if [ "$RET" = "false" ]; then
    21      # terminate installation
    22      echo "You did not accept our terms and conditions. Installation cancelled.\n" >&2
    23      db_purge || true
    24      exit 2
    25  fi