This file is indexed.

config is in diaspora-common 0.7.3.1+debian2ubuntu2.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
#!/bin/sh
# config maintainer script for diaspora-common

CONFIGFILE=/etc/diaspora.conf
 
set -e


# source debconf stuff
. /usr/share/debconf/confmodule

# Load config file, if it exists.
  if [ -e $CONFIGFILE ]; then
      . $CONFIGFILE || true

      # Store values from config file into
      # debconf db.
      db_set diaspora-common/url "$SERVERNAME"
      db_set diaspora-common/ssl "${ENVIRONMENT_REQUIRE_SSL:-true}"
      db_set diaspora-common/letsencrypt "${diaspora_letsencrypt:-false}"
      if [ -n "$diaspora_letsencrypt_email" ]; then
        db_set diaspora-common/letsencrypt_email "${diaspora_letsencrypt_email}"
      fi
  fi

# What is your pod address?
db_input high diaspora-common/url || true
db_go

# Allow user to disable https for local testing
db_input high diaspora-common/ssl || true
db_go

# Don't prompt for letsencrypt if not installed
if command -v letsencrypt >/dev/null; then
  # Do you want Let's Encrypt?
  db_get diaspora-common/ssl
  if [ "${RET}" = "true" ]
  then
    db_input high diaspora-common/letsencrypt || true
    db_go
    db_get diaspora-common/letsencrypt
    diaspora_letsencrypt=$RET
    if [ "$diaspora_letsencrypt" = "true" ]; then
      # Get email for letsencrypt updates
      db_input high diaspora-common/letsencrypt_email || true
      db_go
    fi

  fi
fi

db_input high diaspora-common/services || true
db_go
db_get diaspora-common/services
selectedservices=$RET
if [ "$RET" != "" ]; then
  #Check if Facebook is selected
  servicename="Facebook"
  if [ "${selectedservices#*$servicename}" != "$RET" ]; then
    db_beginblock
      db_input high diaspora-common/facebook_app_id || true
      db_go
      db_input high diaspora-common/facebook_secret || true
      db_go
    db_endblock
    db_get diaspora-common/facebook_app_id
    facebook_app_id=$RET
    db_get diaspora-common/facebook_secret
    facebook_secret=$RET
    # Repeat the questions if user leave any of the two blank
    while [ "$facebook_app_id" = "" ] || [ "$facebook_secret" = "" ]; do
      db_beginblock
        db_input high diaspora-common/facebook_app_id || true
        db_go
        db_input high diaspora-common/facebook_secret || true
        db_go
      db_endblock
      db_get diaspora-common/facebook_app_id
      facebook_app_id=$RET
      db_get diaspora-common/facebook_secret
      facebook_secret=$RET
    done
  fi
  servicename="Twitter"
  if [ "${selectedservices#*$servicename}" != "$selectedservices" ]; then
    db_beginblock
      db_input high diaspora-common/twitter_key || true
      db_go
      db_input high diaspora-common/twitter_secret || true
      db_go
    db_endblock
    db_get diaspora-common/twitter_key
    twitter_key=$RET
    db_get diaspora-common/twitter_secret
    twitter_secret=$RET
    # Repeat the questions if user leave any of the two blank
    while [ "$twitter_key" = "" ] || [ "$twitter_secret" = "" ]; do
      db_beginblock
        db_input high diaspora-common/twitter_key || true
        db_go
        db_input high diaspora-common/twitter_secret || true
        db_go
      db_endblock
      db_get diaspora-common/twitter_key
      twitter_key=$RET
      db_get diaspora-common/twitter_secret
      twitter_secret=$RET
    done
  fi
  servicename="Tumblr"
  if [ "${selectedservices#*$servicename}" != "$selectedservices" ]; then
    db_beginblock
      db_input high diaspora-common/tumblr_key || true
      db_go
      db_input high diaspora-common/tumblr_secret || true
      db_go
    db_endblock
    db_get diaspora-common/tumblr_key
    tumblr_key=$RET
    db_get diaspora-common/tumblr_secret
    tumblr_secret=$RET
    # Repeat the questions if user leave any of the two blank
    while [ "$tumblr_key" = "" ] || [ "$tumblr_secret" = "" ]; do
      db_beginblock
        db_input high diaspora-common/tumblr_key || true
        db_go
        db_input high diaspora-common/tumblr_secret || true
        db_go
      db_endblock
      db_get diaspora-common/tumblr_key
      tumblr_key=$RET
      db_get diaspora-common/tumblr_secret
      tumblr_secret=$RET
    done
  fi
  servicename="Wordpress"
  if [ "${selectedservices#*$servicename}" != "$selectedservices" ]; then
    db_beginblock
      db_input high diaspora-common/wordpress_client_id || true
      db_go
      db_input high diaspora-common/wordpress_secret || true
      db_go
    db_endblock
    db_get diaspora-common/wordpress_client_id
    wordpress_client_id=$RET
    db_get diaspora-common/wordpress_secret
    wordpress_secret=$RET
    # Repeat the questions if user leave any of the two blank
    while [ "$wordpress_client_id" = "" ] || [ "$wordpress_secret" = "" ]; do
      db_beginblock
        db_input high diaspora-common/wordpress_client_id || true
        db_go
        db_input high diaspora-common/wordpress_secret || true
        db_go
      db_endblock
      db_get diaspora-common/wordpress_client_id
      wordpress_client_id=$RET
      db_get diaspora-common/wordpress_secret
      wordpress_secret=$RET
    done
  fi
fi


# DB password can be left blank
db_input high diaspora-common/dbpass || true
db_go

# source dbconfig-common shell library, and call the hook function
if [ -f /usr/share/dbconfig-common/dpkg/config ]; then
   . /usr/share/dbconfig-common/dpkg/config

   dbc_dbtypes="pgsql, mysql"
   dbc_dbname="diaspora_production"
   dbc_dbuser="diaspora"

   dbc_go diaspora-common "$@"
fi