Check that installs succeed
This commit is contained in:
parent
2ce8242faa
commit
1f6cca6f69
|
@ -238,6 +238,9 @@ SSL_PROTOCOLS="TLSv1 TLSv1.1 TLSv1.2"
|
||||||
# list of ciphers to use
|
# list of ciphers to use
|
||||||
SSL_CIPHERS="EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA"
|
SSL_CIPHERS="EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA"
|
||||||
|
|
||||||
|
# message if something fails to install
|
||||||
|
CHECK_MESSAGE="Check your internet connection, /etc/network/interfaces and /etc/resolv.conf"
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
# File which keeps track of what has already been installed
|
# File which keeps track of what has already been installed
|
||||||
|
@ -1066,6 +1069,12 @@ function configure_email {
|
||||||
fi
|
fi
|
||||||
apt-get -y remove postfix
|
apt-get -y remove postfix
|
||||||
apt-get -y --force-yes install exim4 sasl2-bin swaks libnet-ssleay-perl procmail
|
apt-get -y --force-yes install exim4 sasl2-bin swaks libnet-ssleay-perl procmail
|
||||||
|
|
||||||
|
if [ ! -d /etc/exim4 ]; then
|
||||||
|
echo "ERROR: Exim does not appear to have installed. $CHECK_MESSAGE"
|
||||||
|
exit 48
|
||||||
|
fi
|
||||||
|
|
||||||
echo 'dc_eximconfig_configtype="internet"' > /etc/exim4/update-exim4.conf.conf
|
echo 'dc_eximconfig_configtype="internet"' > /etc/exim4/update-exim4.conf.conf
|
||||||
echo "dc_other_hostnames='$DOMAIN_NAME'" >> /etc/exim4/update-exim4.conf.conf
|
echo "dc_other_hostnames='$DOMAIN_NAME'" >> /etc/exim4/update-exim4.conf.conf
|
||||||
echo "dc_local_interfaces=''" >> /etc/exim4/update-exim4.conf.conf
|
echo "dc_local_interfaces=''" >> /etc/exim4/update-exim4.conf.conf
|
||||||
|
@ -1253,6 +1262,12 @@ function configure_imap {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
apt-get -y --force-yes install dovecot-common dovecot-imapd
|
apt-get -y --force-yes install dovecot-common dovecot-imapd
|
||||||
|
|
||||||
|
if [ ! -d /etc/dovecot ]; then
|
||||||
|
echo "ERROR: Dovecot does not appear to have installed. $CHECK_MESSAGE"
|
||||||
|
exit 48
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -f /etc/ssl/private/dovecot.key ]; then
|
if [ ! -f /etc/ssl/private/dovecot.key ]; then
|
||||||
makecert dovecot
|
makecert dovecot
|
||||||
fi
|
fi
|
||||||
|
@ -1350,6 +1365,12 @@ function email_client {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
apt-get -y --force-yes install mutt-patched lynx abook
|
apt-get -y --force-yes install mutt-patched lynx abook
|
||||||
|
|
||||||
|
if [ ! -f /etc/Muttrc ]; then
|
||||||
|
echo "ERROR: Mutt does not appear to have installed. $CHECK_MESSAGE"
|
||||||
|
exit 49
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -d /home/$MY_USERNAME/.mutt ]; then
|
if [ ! -d /home/$MY_USERNAME/.mutt ]; then
|
||||||
mkdir /home/$MY_USERNAME/.mutt
|
mkdir /home/$MY_USERNAME/.mutt
|
||||||
fi
|
fi
|
||||||
|
@ -1682,6 +1703,12 @@ function install_web_server {
|
||||||
fi
|
fi
|
||||||
# install nginx
|
# install nginx
|
||||||
apt-get -y --force-yes install nginx php5-fpm git
|
apt-get -y --force-yes install nginx php5-fpm git
|
||||||
|
|
||||||
|
if [ ! -d /etc/nginx ]; then
|
||||||
|
echo "ERROR: nginx does not appear to have installed. $CHECK_MESSAGE"
|
||||||
|
exit 51
|
||||||
|
fi
|
||||||
|
|
||||||
# install a script to easily enable and disable nginx virtual hosts
|
# install a script to easily enable and disable nginx virtual hosts
|
||||||
if [ ! -d $INSTALL_DIR ]; then
|
if [ ! -d $INSTALL_DIR ]; then
|
||||||
mkdir $INSTALL_DIR
|
mkdir $INSTALL_DIR
|
||||||
|
@ -1902,6 +1929,12 @@ function install_xmpp {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
apt-get -y --force-yes install prosody
|
apt-get -y --force-yes install prosody
|
||||||
|
|
||||||
|
if [ ! -d /etc/prosody ]; then
|
||||||
|
echo "ERROR: prosody does not appear to have installed. $CHECK_MESSAGE"
|
||||||
|
exit 52
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -f "/etc/ssl/private/xmpp.key" ]; then
|
if [ ! -f "/etc/ssl/private/xmpp.key" ]; then
|
||||||
makecert xmpp
|
makecert xmpp
|
||||||
fi
|
fi
|
||||||
|
@ -1971,6 +2004,12 @@ function install_irc_server {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
apt-get -y --force-yes install ngircd
|
apt-get -y --force-yes install ngircd
|
||||||
|
|
||||||
|
if [ ! -d /etc/ngircd ]; then
|
||||||
|
echo "ERROR: ngircd does not appear to have installed. $CHECK_MESSAGE"
|
||||||
|
exit 53
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! "/etc/ssl/private/ngircd.key" ]; then
|
if [ ! "/etc/ssl/private/ngircd.key" ]; then
|
||||||
makecert ngircd
|
makecert ngircd
|
||||||
fi
|
fi
|
||||||
|
@ -2382,6 +2421,12 @@ function install_mariadb {
|
||||||
debconf-set-selections <<< "mariadb-server mariadb-server/root_password password $MARIADB_PASSWORD"
|
debconf-set-selections <<< "mariadb-server mariadb-server/root_password password $MARIADB_PASSWORD"
|
||||||
debconf-set-selections <<< "mariadb-server mariadb-server/root_password_again password $MARIADB_PASSWORD"
|
debconf-set-selections <<< "mariadb-server mariadb-server/root_password_again password $MARIADB_PASSWORD"
|
||||||
apt-get -y --force-yes install mariadb-server
|
apt-get -y --force-yes install mariadb-server
|
||||||
|
|
||||||
|
if [ ! -d /etc/mysql ]; then
|
||||||
|
echo "ERROR: mariadb-server does not appear to have installed. $CHECK_MESSAGE"
|
||||||
|
exit 54
|
||||||
|
fi
|
||||||
|
|
||||||
mysqladmin -u root password "$MARIADB_PASSWORD"
|
mysqladmin -u root password "$MARIADB_PASSWORD"
|
||||||
echo 'install_mariadb' >> $COMPLETION_FILE
|
echo 'install_mariadb' >> $COMPLETION_FILE
|
||||||
}
|
}
|
||||||
|
@ -2859,6 +2904,12 @@ function install_dlna_server {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
apt-get -y --force-yes install minidlna
|
apt-get -y --force-yes install minidlna
|
||||||
|
|
||||||
|
if [ ! -f /etc/minidlna.conf ]; then
|
||||||
|
echo "ERROR: minidlna does not appear to have installed. $CHECK_MESSAGE"
|
||||||
|
exit 55
|
||||||
|
fi
|
||||||
|
|
||||||
sed -i "s|media_dir=/var/lib/minidlna|media_dir=A,/home/$MY_USERNAME/Music|g" /etc/minidlna.conf
|
sed -i "s|media_dir=/var/lib/minidlna|media_dir=A,/home/$MY_USERNAME/Music|g" /etc/minidlna.conf
|
||||||
if ! grep -q "/home/$MY_USERNAME/Pictures" /etc/minidlna.conf; then
|
if ! grep -q "/home/$MY_USERNAME/Pictures" /etc/minidlna.conf; then
|
||||||
echo "media_dir=P,/home/$MY_USERNAME/Pictures" >> /etc/minidlna.conf
|
echo "media_dir=P,/home/$MY_USERNAME/Pictures" >> /etc/minidlna.conf
|
||||||
|
@ -3093,7 +3144,7 @@ function create_backup_script {
|
||||||
apt-get -y --force-yes install obnam bcrypt
|
apt-get -y --force-yes install obnam bcrypt
|
||||||
|
|
||||||
if [ ! -d /etc/obnam ]; then
|
if [ ! -d /etc/obnam ]; then
|
||||||
echo 'obnam may not have installed correctly. Check your internet connection, /etc/network/interfaces and /etc/resolv.conf'
|
echo "ERROR: obnam may not have installed correctly. $CHECK_MESSAGE"
|
||||||
exit 46
|
exit 46
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue