Integrate the debconf settings into the script to make it self-supporting

This commit is contained in:
Julien Malik 2015-09-06 23:11:19 +02:00
parent 97234cfced
commit edbde8450a

View file

@ -172,9 +172,44 @@ apt_update() {
register_debconf() { register_debconf() {
if [[ $(lsb_release -c | awk '{print $2}') == jessie ]]; if [[ $(lsb_release -c | awk '{print $2}') == jessie ]];
then then
debconf-set-selections "$(this_script_path)/debconfjessie" cat << EOF > debconf-set-selections
slapd slapd/password1 password yunohost
slapd slapd/password2 password yunohost
slapd slapd/domain string yunohost.org
slapd shared/organization string yunohost.org
slapd slapd/allow_ldap_v2 boolean false
slapd slapd/invalid_config boolean true
slapd slapd/backend select MDB
postfix postfix/main_mailer_type select Internet Site
postfix postfix/mailname string /etc/mailname
mysql-server-5.5 mysql-server/root_password password yunohost
mysql-server-5.5 mysql-server/root_password_again password yunohost
nslcd nslcd/ldap-bindpw password
nslcd nslcd/ldap-starttls boolean false
nslcd nslcd/ldap-reqcert select
nslcd nslcd/ldap-uris string ldap://localhost/
nslcd nslcd/ldap-binddn string
nslcd nslcd/ldap-base string dc=yunohost,dc=org
libnss-ldapd libnss-ldapd/nsswitch multiselect group, passwd, shadow
EOF
else else
debconf-set-selections "$(this_script_path)/debconfv2" cat << EOF > debconf-set-selections
slapd slapd/password1 password yunohost
slapd slapd/password2 password yunohost
slapd slapd/domain string yunohost.org
slapd shared/organization string yunohost.org
postfix postfix/main_mailer_type select Internet Site
postfix postfix/mailname string /etc/mailname
mysql-server-5.5 mysql-server/root_password password yunohost
mysql-server-5.5 mysql-server/root_password_again password yunohost
nslcd nslcd/ldap-bindpw password
nslcd nslcd/ldap-starttls boolean false
nslcd nslcd/ldap-reqcert select
nslcd nslcd/ldap-uris string ldap://localhost/
nslcd nslcd/ldap-binddn string
nslcd nslcd/ldap-base string dc=yunohost,dc=org
libnss-ldapd libnss-ldapd/nsswitch multiselect group, passwd, shadow
EOF
fi fi
} }
@ -339,4 +374,3 @@ fi
# Success ! # Success !
success success
exit 0 exit 0