From d5988d7353017dd087f723ef8c3d12303ca9f918 Mon Sep 17 00:00:00 2001 From: Adrien Beudin Date: Sun, 24 Jun 2012 11:14:39 +0200 Subject: [PATCH] new file: debconf new file: install_yunohost --- debconf | 14 +++++++++ install_yunohost | 76 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 debconf create mode 100755 install_yunohost diff --git a/debconf b/debconf new file mode 100644 index 0000000..f555847 --- /dev/null +++ b/debconf @@ -0,0 +1,14 @@ +postfix postfix/main_mailer_type select Internet Site +postfix postfix/mailname string /etc/mailname +mysql-server-5.1 mysql-server/root_password password +mysql-server-5.1 mysql-server/root_password_again password +samba-common samba-common/workgroup string WORKGROUP +samba-common samba-common/workgroup boolean true +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 +proftpd-basic shared/proftpd/inetd_or_standalone select standalone +libnss-ldapd libnss-ldapd/nsswitch multiselect group, passwd, shadow diff --git a/install_yunohost b/install_yunohost new file mode 100755 index 0000000..05ca38e --- /dev/null +++ b/install_yunohost @@ -0,0 +1,76 @@ +#!/bin/bash + +echo "YunoHost Installation" +echo "Do you want install Yunhost? (Y/n)" + +read rep + +if [ $rep = "Y" ] || [ $rep = "y" ]; +then + echo "======== Update hostname ========" + # Update hostname + echo "yunohost" > /etc/hostname + grep "yunohost.$(hostname -d)" /etc/hosts + if [ $? = 1 ]; + then + echo -e "127.0.0.1\tyunohost.$(hostname -d)\tyunohost" > /etc/hosts + /etc/init.d/hostname.sh start + fi + + echo "======== Add repository ========" + #Get gpg key + wget -O- http://lemonldap-ng.org/_media/rpm-gpg-key-ow2 | apt-key add - + wget -O- http://repo.yunohost.org/yunohost.asc | apt-key add - + grep "lemonldap-ng.org" /etc/apt/sources.list + if [ $? = 1 ]; + then + echo "deb http://lemonldap-ng.org/deb squeeze main" >> /etc/apt/sources.list + fi + grep "yunohost" /etc/apt/sources.list + if [ $? = 1 ]; + then + if [ $(lsb_release -cs) = "Debian" ]; + then + echo "deb http://repo.yunohost.org/ squeeze main" >> /etc/apt/sources.list + elif [ $(lsb_release -cs) = "Ubuntu" ]; + then + echo "deb http://repo.yunohost.org/ precise main" >> /etc/apt/sources.list + fi + fi + + #Update repo + apt-get update + if [ $? != 0 ] ; + then + echo "Update Repo Failure" + exit 1 + fi + + echo "======== Install ========" + #add answer in debconf db + wget https://raw.github.com/YunoHost/build/master/debconf + debconf-set-selections debconf + + #Install yunohost packages + apt-get install yunohost yunohost-config yunohost-config-postfix postfix postfix-ldap postfix-policyd-spf-perl + if [ $? != 0 ] ; + then + echo "Install yunohost Failure" + exit 1 + else + service slapd restart + service apache2 restart + service dovecot restart + service postfix restart + service ejabberd restart + service iptables start + service nscd restart + service nslcd restart + echo "======== Installation succes ========" + + fi + +else + echo "======== Installation cancel ========" + exit 1 +fi