040_keyrings 575 B

12345678910111213141516
  1. #!/bin/sh
  2. set -e
  3. set -u
  4. echo "Setting up default keyrings"
  5. psql -c "INSERT INTO binary_acl (access_level) VALUES ('full'), ('map')" >/dev/null
  6. psql -c "INSERT INTO source_acl (access_level) VALUES ('full'), ('dm')" >/dev/null
  7. psql -c "INSERT INTO keyrings (name, default_source_acl_id, default_binary_acl_id)
  8. VALUES ('${DAKBASE}/keyrings/upload-keyring.gpg',
  9. (SELECT id FROM binary_acl WHERE access_level = 'full'),
  10. (SELECT id FROM source_acl WHERE access_level = 'full'))" >/dev/null