1 hint
="run before: remote/runit-configure nginx -- $site"
2 assert
"sudo test -f /etc/nginx/x509.d/\"$site\"/key.pem" hint
3 hint
="run before: remote/runit-configure nginx -- $site"
4 assert
"sudo test -f /etc/$site/config.inc.php" hint
6 sudo
install -m 664 -o www
-g www \
7 "$tool"/var
/pub
/x509
/"$site".
"$local_domainname"/crt
+ca.pem \
8 /etc
/nginx
/x509.d
/"$site"/crt.pem
10 sudo adduser php_
"$site" www-
"$site"
11 sudo adduser php_
"$site" postgres-data
12 sudo adduser php_
"$site" log-php-
"$site"
14 "$tool"/local
/runit-sv-configure postgres
15 "$tool"/local
/runit-sv-start postgres
16 while ! sudo
-u postgres psql
</dev
/null
19 "$tool"/local
/postgresql-user-create
"$site"
20 "$tool"/local
/postgresql-database-create
"$site"
21 "$tool"/local
/postgresql-schema-create
"$site"
22 sudo
-u postgres psql
-AqtX --set ON_ERROR_STOP
=1 "$site" <<-EOF
23 GRANT USAGE ON SCHEMA pg_catalog TO $site;
25 #sudo -u postgres psql "$site" -a -f - --set ON_ERROR_STOP=1 <<-EOF
26 # -- GRANT USAGE,CREATE ON SCHEMA public TO $site;
29 eval home
="~www-$site"
30 sudo debconf-set-selections
<<-EOF || true
31 # Password confirmation:
32 roundcube-core roundcube/password-confirm password
33 # Password of the database's administrative user:
34 roundcube-core roundcube/mysql/admin-pass password
35 # MySQL application password for roundcube:
36 roundcube-core roundcube/mysql/app-pass password
37 # Password confirmation:
38 roundcube-core roundcube/app-password-confirm password
39 # PostgreSQL application password for roundcube:
40 roundcube-core roundcube/pgsql/app-pass password
41 # Password of your database's administrative user:
42 roundcube-core roundcube/pgsql/admin-pass password
43 # Next step for database upgrade:
44 # Choices: abort, retry, retry (skip questions)
45 roundcube-core roundcube/upgrade-error select abort
46 # Method for authenticating PostgreSQL user:
47 # Choices: ident, password
48 roundcube-core roundcube/pgsql/authmethod-user select ident
49 # Do you want to purge the database for roundcube?
50 roundcube-core roundcube/purge boolean false
51 # Configure database for roundcube with dbconfig-common?
52 roundcube-core roundcube/dbconfig-install boolean true
54 # Choices: ar_SA, ast, az_AZ, bg_BG, bn_BD, br, bs_BA, ca_ES, cs_CZ, cy_GB, da_DK, de_CH, de_DE, el_GR, en_GB, en_US, eo, es_AR, es_ES, et_EE, eu_ES, fa, fa_AF, fi_FI, fr_FR, ga_IE, gl_ES, he_IL, hi_IN, hr_HR, hu_HU, hy_AM, id_ID, is_IS, it_IT, ja_JP, ka_GE, kh_KH, ko_KR, ku, lt_LT, lv_LV, mk_MK, mr_IN, ms_MY, nb_NO, ne_NP, nl_BE, nl_NL, nn_NO, pl_PL, ps, pt_BR, pt_PT, ro_RO, ru_RU, si_LK, sk_SK, sl_SI, sq_AL, sr_CS, sv_SE, ta_IN, th_TH, tr_TR, uk_UA, vi_VN, zh_CN, zh_TW
55 roundcube-core roundcube/language select fr_FR
56 # PostgreSQL database name for roundcube:
57 roundcube-core roundcube/db/dbname string roundcube
58 # Host running the PostgreSQL server for roundcube:
59 roundcube-core roundcube/remote/newhost string
60 # Change PostgreSQL configuration automatically?
61 roundcube-core roundcube/pgsql/changeconf boolean false
62 # Do you want to back up the database for roundcube before upgrading?
63 roundcube-core roundcube/upgrade-backup boolean true
64 # Next step for database installation:
65 # Choices: abort, retry, retry (skip questions), ignore
66 roundcube-core roundcube/install-error select retry
67 # Name of the database's administrative user:
68 roundcube-core roundcube/mysql/admin-user string root
69 # IMAP server(s) used with RoundCube:
70 roundcube-core roundcube/hosts string imap.heureux-cyclage.org
71 # Method for authenticating the PostgreSQL administrator:
72 # Choices: ident, password
73 roundcube-core roundcube/pgsql/authmethod-admin select ident
74 # Deconfigure database for roundcube with dbconfig-common?
75 roundcube-core roundcube/dbconfig-remove boolean
76 # Name of the database's administrative user:
77 roundcube-core roundcube/pgsql/admin-user string postgres
79 roundcube-core roundcube/internal/skip-preseed boolean false
80 # PostgreSQL username for roundcube:
81 roundcube-core roundcube/db/app-user string php_$site
82 # Reinstall database for roundcube?
83 roundcube-core roundcube/dbconfig-reinstall boolean false
84 # Connection method for MySQL database of roundcube:
85 # Choices: unix socket, tcp/ip
86 roundcube-core roundcube/mysql/method select unix socket
87 # Next step for database removal:
88 # Choices: abort, retry
89 roundcube-core roundcube/remove-error select abort
90 # Should the webserver(s) be restarted now?
91 roundcube-core roundcube/restart-webserver boolean false
92 # Perform upgrade on database for roundcube with dbconfig-common?
93 roundcube-core roundcube/dbconfig-upgrade boolean true
94 # Port number for the PostgreSQL service:
95 roundcube-core roundcube/remote/port string
96 # Connection method for PostgreSQL database of roundcube:
97 # Choices: unix socket, tcp/ip, tcp/ip + ssl
98 roundcube-core roundcube/pgsql/method select unix socket
99 # Modifications needed in /etc/postgresql/pg_hba.conf
100 roundcube-core roundcube/pgsql/manualconf note
101 # storage directory for roundcube:
102 roundcube-core roundcube/db/basepath string
103 # Empty passwords unsupported with PostgreSQL
104 roundcube-core roundcube/pgsql/no-empty-passwords error
106 roundcube-core roundcube/passwords-do-not-match error
108 roundcube-core roundcube/internal/reconfiguring boolean false
109 # Web server(s) to configure automatically:
110 # Choices: apache2, lighttpd
111 roundcube-core roundcube/reconfigure-webserver multiselect
112 # Database type to be used by roundcube:
113 # Choices: mysql, pgsql
114 roundcube-core roundcube/database-type select pgsql
115 # Host name of the PostgreSQL database server for roundcube:
117 roundcube-core roundcube/remote/host select
119 # Choices: abort, retry, ignore
120 roundcube-core roundcube/missing-db-package-error select abort
122 sudo
install -d -m 755 -o root
-g root \
124 sudo
install -m 600 -o root
-g root
/dev
/stdin \
125 /etc
/dbconfig-common
/"$site".conf
<<-EOF
126 dbc_authmethod_admin='ident'
127 dbc_authmethod_user='ident'
129 dbc_dbadmin='postgres'
133 dbc_dbserver='/run/postgresql'
142 ! sudo etckeeper unclean ||
143 sudo etckeeper commit
-m "runit-configure nginx -- $site"
145 #"$tool"/local/apt-get-install \
155 sudo chgrp php_
$site /var
/log
/roundcube
/
157 sudo
install -d -m 750 -o root
-g php_
"$site" \
159 sudo
find "$tool"/etc
/"$site" -type f \
160 -exec install -m 640 -o root
-g php_
"$site" \
161 -t /etc
/"$site"/ {} +
163 sudo
install -m 500 -o php_
"$site" -g root \
164 "$tool"/local
/roundcube-chpasswd \
165 /usr
/local
/bin
/roundcube-chpasswd