github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/go/apps/newfileproxy/NewfileproxyDomain/initfileproxy (about)

     1  #
     2  source ./defines
     3  
     4  if [[ -e $DOMAIN ]]
     5  then
     6    echo "$DOMAIN exists"
     7  else
     8    mkdir $DOMAIN
     9    mkdir $DOMAIN/policy_keys
    10    echo "$DOMAIN created"
    11  fi
    12  
    13  if [[ -e $TEMPLATE ]]
    14  then
    15    echo "$TEMPLATE exists"
    16  else
    17    cp $OLD_TEMPLATE $TEMPLATE
    18    echo "$OLDTEMPLATE copied to $TEMPLATE"
    19  fi
    20  
    21  if [[ -e $DOMAIN/linux_tao_host ]]
    22  then
    23    echo "$DOMAIN/linux_tao_host exists"
    24  else
    25    mkdir $DOMAIN/linux_tao_host
    26    echo "$DOMAIN/linux_tao_host created"
    27  fi
    28  
    29  #
    30  # For soft tao, we need a key and it must be in the template.
    31  #
    32  
    33  KEY_NAME="$($BINPATH/tao domain newsoft -soft_pass xxx -config_template $TEMPLATE $DOMAIN/linux_tao_host)"
    34  echo "host_name: \"$KEY_NAME\"" | tee -a $TEMPLATE