File: phabricator.config

package info (click to toggle)
phabricator 0~git20190207-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 71,728 kB
  • sloc: php: 552,244; sql: 16,997; ansic: 3,619; yacc: 2,503; sh: 754; xml: 519; lex: 488; cpp: 221; python: 186; makefile: 177; sed: 66
file content (67 lines) | stat: -rwxr-xr-x 1,633 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

set -e

# Source debconf library.
. /usr/share/debconf/confmodule

# Establish the preliminaries.
db_version 2.0
db_capb backup

# Is the password known
db_fget phabricator/phabricator_mysql_pwd seen
if [ "$RET" = "true" ]; then
    db_get phabricator/phabricator_mysql_pwd || [ $? = 30 ]
    db_set phabricator/pwd_check "$RET"
    db_fset phabricator/pwd_check seen true
else
    db_fset phabricator/pwd_check seen false
fi

# Prompt the user for values
db_input high phabricator/domain_name || true
db_go
db_get phabricator/domain_name
if [ "$RET" = "" ]; then
  db_reset phabricator/domain_name
fi

db_input high phabricator/webserver || true
db_go
db_get phabricator/webserver

db_input low phabricator/mysql_host || true
db_input high phabricator/phabricator_mysql_user || true
db_go
db_get phabricator/phabricator_mysql_user
if [ "$RET" = "" ]; then
  db_reset phabricator/phabricator_mysql_user
fi

#ask for password
while :; do
  RET=""
  db_input high phabricator/phabricator_mysql_pwd || true
  db_go
  db_get phabricator/phabricator_mysql_pwd
  # if password isn't empty we ask for password verification
  if [ -z "$RET" ]; then
    db_fset phabricator/phabricator_mysql_pwd seen false
    db_fset phabricator/pwd_check seen false
    break
  fi
  MYSQL_PW="$RET"
  db_input high phabricator/pwd_check || true
  db_go
  db_get phabricator/pwd_check
  if [ "$RET" = "$MYSQL_PW" ]; then
    MYSQL_PW=''
    break
  fi
  db_fset phabricator/password_mismatch seen false
  db_input critical phabricator/password_mismatch
  db_set phabricator/phabricator_mysql_pwd ""
  db_set phabricator/pwd_check ""
  db_go
done