From 0867ae24192a89942aa55b4ca9d7ec84546c4ad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lebleu?= Date: Tue, 17 Nov 2015 11:50:08 +0100 Subject: [PATCH] Revert "[enh] Use the new stable repository" This reverts commit 5f1fd14f0703aa070615ed54e99530053a5cbe46, since it is not ready yet for a stable release. --- install_yunohostv2 | 83 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 71 insertions(+), 12 deletions(-) diff --git a/install_yunohostv2 b/install_yunohostv2 index e6e7f57..3b506bb 100755 --- a/install_yunohostv2 +++ b/install_yunohostv2 @@ -103,8 +103,34 @@ installscript_dependencies() { } create_custom_config() { - mkdir -p /etc/yunohost/ - touch /etc/yunohost/from_script + if [[ "$DISTRIB" != "daily" ]] && [[ "$DISTRIB" != "unstable" ]] \ + && [[ "$DISTRIB" != "test" ]] && [[ "$DISTRIB" != "testing" ]] ; then + if [[ ! -f /etc/yunohost/yunohost.conf ]] + then + mkdir -p /etc/yunohost/ + touch /etc/yunohost/from_script + cat << EOF > /etc/yunohost/yunohost.conf +# Yunohost custom config +# If you want to keep a custom service configuration replace "no" by "yes" +# for the concerned service + +amavis=no +avahi=no +dovecot=no +iptables=no +metronome=no +mysql=no +nginx=no +postfix=no +slapd=no +ssh=yes +ssowat=no +EOF + fi + else + mkdir -p /etc/yunohost/ + touch /etc/yunohost/from_script + fi } set_domain() { @@ -138,14 +164,15 @@ Are you sure you want to proceed with the installation of Yunohost? setup_package_source() { local CUSTOMAPT=/etc/apt/sources.list.d/yunohost.list - if [[ "$DISTRIB" == "megusta" ]] || [[ "$DISTRIB" == "stable" ]] ; then - echo "deb http://repo.yunohost.org/debian jessie stable" > $CUSTOMAPT - fi + # In any case we need the main stable repo + echo "deb http://repo.yunohost.org/ megusta main" > $CUSTOMAPT + + # Also add repositories for 'testing' and/or 'unstable' if the script has been called with those arguments if [[ "$DISTRIB" == "test" ]] || [[ "$DISTRIB" == "testing" ]] ; then - echo "deb http://repo.yunohost.org/debian jessie testing" > $CUSTOMAPT + echo "deb http://repo.yunohost.org/debian stable testing" >> $CUSTOMAPT fi if [[ "$DISTRIB" == "daily" ]] || [[ "$DISTRIB" == "unstable" ]] ; then - echo "deb http://repo.yunohost.org/debian jessie testing unstable" > $CUSTOMAPT + echo "deb http://repo.yunohost.org/debian stable testing unstable" > $CUSTOMAPT fi # Add YunoHost repository key to the keyring @@ -157,7 +184,9 @@ apt_update() { } register_debconf() { - debconf-set-selections << EOF + if [[ $(lsb_release -c | awk '{print $2}') == jessie ]]; + then + debconf-set-selections << EOF slapd slapd/password1 password yunohost slapd slapd/password2 password yunohost slapd slapd/domain string yunohost.org @@ -177,6 +206,25 @@ 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 + debconf-set-selections << EOF +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 } workaround_avahi_installation() { @@ -220,10 +268,21 @@ workaround_avahi_installation() { } install_yunohost_packages() { - apt_get_wrapper \ - -o Dpkg::Options::="--force-confold" \ - -y --force-yes install \ - yunohost postfix + if [[ "$DISTRIB" != "daily" ]] && [[ "$DISTRIB" != "unstable" ]] \ + && [[ "$DISTRIB" != "test" ]] && [[ "$DISTRIB" != "testing" ]] ; then + apt_get_wrapper \ + -o Dpkg::Options::="--force-confold" \ + -y --force-yes install \ + yunohost yunohost-config \ + yunohost-config-postfix \ + postfix postfix-ldap \ + postfix-policyd-spf-perl + else + apt_get_wrapper \ + -o Dpkg::Options::="--force-confold" \ + -y --force-yes install \ + yunohost postfix + fi } restart_services() {