new file: debconf

new file:   install_yunohost
This commit is contained in:
Adrien Beudin 2012-06-24 11:14:39 +02:00
parent 41f08cbef4
commit d5988d7353
2 changed files with 90 additions and 0 deletions

14
debconf Normal file
View file

@ -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

76
install_yunohost Executable file
View file

@ -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