Remove unsafe option --force-yes

This commit is contained in:
Bob Mottram 2015-01-30 11:41:12 +00:00
parent 780397d0b0
commit f99b293962
1 changed files with 41 additions and 41 deletions

View File

@ -1824,7 +1824,7 @@ function create_backup_script {
if grep -Fxq "create_backup_script" $COMPLETION_FILE; then
return
fi
apt-get -y --force-yes install rsyncrypto
apt-get -y install rsyncrypto
get_mariadb_password
get_mariadb_gnusocial_admin_password
@ -2333,7 +2333,7 @@ function create_restore_script {
if grep -Fxq "create_restore_script" $COMPLETION_FILE; then
return
fi
apt-get -y --force-yes install rsyncrypto
apt-get -y install rsyncrypto
get_mariadb_password
get_mariadb_gnusocial_admin_password
@ -2904,7 +2904,7 @@ function backup_to_friends_servers {
return
fi
apt-get -y --force-yes install rsyncrypto sshpass
apt-get -y install rsyncrypto sshpass
get_mariadb_password
get_mariadb_gnusocial_admin_password
@ -3545,7 +3545,7 @@ function restore_from_friend {
return
fi
apt-get -y --force-yes install rsyncrypto sshpass
apt-get -y install rsyncrypto sshpass
get_mariadb_password
get_mariadb_gnusocial_admin_password
@ -4085,7 +4085,7 @@ function enforce_good_passwords {
if grep -Fxq "enforce_good_passwords" $COMPLETION_FILE; then
return
fi
apt-get -y --force-yes install libpam-cracklib
apt-get -y install libpam-cracklib
sed -i 's/password.*requisite.*pam_cracklib.so.*/password required pam_cracklib.so retry=2 dcredit=-4 ucredit=-1 ocredit=-1 lcredit=0 minlen=10 reject_username/g' /etc/pam.d/common-password
echo 'enforce_good_passwords' >> $COMPLETION_FILE
@ -4304,7 +4304,7 @@ function change_debian_repos {
fi
apt-get update
apt-get -y --force-yes install apt-transport-https
apt-get -y install apt-transport-https
echo 'change_debian_repos' >> $COMPLETION_FILE
}
@ -4515,7 +4515,7 @@ function random_number_generator {
# On systems which are not beaglebones assume that
# no hardware random number generator is available
# and use the second best option
apt-get -y --force-yes install haveged
apt-get -y install haveged
return
fi
if [[ $INSTALLED_WITHIN_DOCKER == "yes" ]]; then
@ -4524,10 +4524,10 @@ function random_number_generator {
return
fi
if [[ $USE_HWRNG == "yes" ]]; then
apt-get -y --force-yes install rng-tools
apt-get -y install rng-tools
sed -i 's|#HRNGDEVICE=/dev/hwrng|HRNGDEVICE=/dev/hwrng|g' /etc/default/rng-tools
else
apt-get -y --force-yes install haveged
apt-get -y install haveged
fi
echo 'random_number_generator' >> $COMPLETION_FILE
}
@ -4569,7 +4569,7 @@ function configure_ssh {
echo "KexAlgorithms $SSH_KEX" >> /etc/ssh/sshd_config
fi
apt-get -y --force-yes install fail2ban
apt-get -y install fail2ban
echo 'configure_ssh' >> $COMPLETION_FILE
# Don't reboot if installing within docker
# random numbers will come from the host system
@ -4661,11 +4661,11 @@ function time_synchronisation {
if grep -Fxq "time_synchronisation" $COMPLETION_FILE; then
return
fi
#apt-get -y --force-yes install tlsdate
#apt-get -y install tlsdate
# building tlsdate from source is a workaround because of
# this bug https://github.com/ioerror/tlsdate/issues/130
apt-get -y --force-yes install build-essential automake git pkg-config autoconf libtool libssl-dev libevent-dev
apt-get -y install build-essential automake git pkg-config autoconf libtool libssl-dev libevent-dev
if [ ! -d $INSTALL_DIR ]; then
mkdir $INSTALL_DIR
@ -5088,7 +5088,7 @@ function configure_email {
return
fi
apt-get -y remove postfix
apt-get -y --force-yes install exim4 sasl2-bin swaks libnet-ssleay-perl procmail
apt-get -y 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"
@ -5211,8 +5211,8 @@ function spam_filtering {
if grep -Fxq "spam_filtering" $COMPLETION_FILE; then
return
fi
apt-get -y --force-yes install exim4-daemon-heavy
apt-get -y --force-yes install spamassassin
apt-get -y install exim4-daemon-heavy
apt-get -y install spamassassin
sa-update -v
sed -i 's/ENABLED=0/ENABLED=1/g' /etc/default/spamassassin
sed -i 's/# spamd_address = 127.0.0.1 783/spamd_address = 127.0.0.1 783/g' /etc/exim4/exim4.conf.template
@ -5306,7 +5306,7 @@ function configure_imap {
if grep -Fxq "configure_imap" $COMPLETION_FILE; then
return
fi
apt-get -y --force-yes install dovecot-common dovecot-imapd
apt-get -y install dovecot-common dovecot-imapd
if [ ! -d /etc/dovecot ]; then
echo "ERROR: Dovecot does not appear to have installed. $CHECK_MESSAGE"
@ -5344,7 +5344,7 @@ function configure_gpg {
if grep -Fxq "configure_gpg" $COMPLETION_FILE; then
return
fi
apt-get -y --force-yes install gnupg
apt-get -y install gnupg
# if gpg keys directory was previously imported from usb
if [[ $GPG_KEYS_IMPORTED == "yes" && -d /home/$MY_USERNAME/.gnupg ]]; then
@ -5449,7 +5449,7 @@ function encrypt_incoming_email {
return
fi
if [ ! -f /usr/bin/gpgit.pl ]; then
apt-get -y --force-yes install git libmail-gnupg-perl
apt-get -y install git libmail-gnupg-perl
cd $INSTALL_DIR
git clone https://github.com/mikecardwell/gpgit
cd gpgit
@ -5637,7 +5637,7 @@ function email_client {
if grep -Fxq "email_client" $COMPLETION_FILE; then
return
fi
apt-get -y --force-yes install mutt-patched lynx abook
apt-get -y install mutt-patched lynx abook
if [ ! -f /etc/Muttrc ]; then
echo "ERROR: Mutt does not appear to have installed. $CHECK_MESSAGE"
@ -5922,7 +5922,7 @@ function create_public_mailing_list {
PUBLIC_MAILING_LIST_USER="mlmmj"
apt-get -y --force-yes install mlmmj
apt-get -y install mlmmj
adduser --system $PUBLIC_MAILING_LIST_USER
addgroup $PUBLIC_MAILING_LIST_USER
adduser $PUBLIC_MAILING_LIST_USER $PUBLIC_MAILING_LIST_USER
@ -6024,7 +6024,7 @@ function create_private_mailing_list {
echo 'the top of the script'
exit 11
fi
apt-get -y --force-yes install ruby ruby-dev ruby-gpgme libgpgme11-dev libmagic-dev
apt-get -y install ruby ruby-dev ruby-gpgme libgpgme11-dev libmagic-dev
gem install schleuder
schleuder-fix-gem-dependencies
schleuder-init-setup --gem
@ -6126,7 +6126,7 @@ function install_web_server {
rm -rf /etc/apache2
fi
# install nginx
apt-get -y --force-yes install nginx php5-fpm git
apt-get -y install nginx php5-fpm git
# limit the number of php processes
sed -i 's/; process.max = 128/process.max = 32/g' /etc/php5/fpm/php-fpm.conf
@ -6247,8 +6247,8 @@ function install_mariadb {
if grep -Fxq "install_mariadb" $COMPLETION_FILE; then
return
fi
apt-get -y --force-yes install python-software-properties debconf-utils
apt-get -y --force-yes install software-properties-common
apt-get -y install python-software-properties debconf-utils
apt-get -y install software-properties-common
apt-get -y update
get_mariadb_password
@ -6268,7 +6268,7 @@ function install_mariadb {
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"
apt-get -y --force-yes install mariadb-server
apt-get -y install mariadb-server
if [ ! -d /etc/mysql ]; then
echo "ERROR: mariadb-server does not appear to have installed. $CHECK_MESSAGE"
@ -6485,7 +6485,7 @@ function install_owncloud {
exit 6746
fi
fi
apt-get -y --force-yes install owncloud
apt-get -y install owncloud
install_mariadb
get_mariadb_password
@ -6696,7 +6696,7 @@ function install_xmpp {
if grep -Fxq "install_xmpp" $COMPLETION_FILE; then
return
fi
apt-get -y --force-yes install prosody
apt-get -y install prosody
if [ ! -d /etc/prosody ]; then
echo "ERROR: prosody does not appear to have installed. $CHECK_MESSAGE"
@ -6820,7 +6820,7 @@ function install_irc_server {
if grep -Fxq "install_irc_server" $COMPLETION_FILE; then
return
fi
apt-get -y --force-yes install ngircd
apt-get -y install ngircd
if [ ! -d /etc/ngircd ]; then
echo "ERROR: ngircd does not appear to have installed. $CHECK_MESSAGE"
@ -6908,7 +6908,7 @@ function install_wiki {
if [ ! $WIKI_DOMAIN_NAME ]; then
return
fi
apt-get -y --force-yes install dokuwiki
apt-get -y install dokuwiki
if [ ! -d /var/www/$WIKI_DOMAIN_NAME ]; then
mkdir /var/www/$WIKI_DOMAIN_NAME
@ -7433,7 +7433,7 @@ function install_gnu_social {
get_mariadb_password
repair_databases_script
apt-get -y --force-yes install php-gettext php5-curl php5-gd php5-mysql git curl php-xml-parser
apt-get -y install php-gettext php5-curl php5-gd php5-mysql git curl php-xml-parser
if [ ! -d /var/www/$MICROBLOG_DOMAIN_NAME ]; then
mkdir /var/www/$MICROBLOG_DOMAIN_NAME
@ -7679,7 +7679,7 @@ function install_redmatrix {
get_mariadb_password
repair_databases_script
apt-get -y --force-yes install php5-common php5-cli php5-curl php5-gd php5-mysql php5-mcrypt git
apt-get -y install php5-common php5-cli php5-curl php5-gd php5-mysql php5-mcrypt git
if [ ! -d /var/www/$REDMATRIX_DOMAIN_NAME ]; then
mkdir /var/www/$REDMATRIX_DOMAIN_NAME
@ -7975,7 +7975,7 @@ function install_dlna_server {
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_TOR_DONGLE" ]]; then
return
fi
apt-get -y --force-yes install minidlna
apt-get -y install minidlna
if [ ! -f /etc/minidlna.conf ]; then
echo "ERROR: minidlna does not appear to have installed. $CHECK_MESSAGE"
@ -8034,9 +8034,9 @@ function install_mediagoblin {
if [ ! $MEDIAGOBLIN_DOMAIN_NAME ]; then
return
fi
apt-get -y --force-yes install git-core python python-dev python-lxml python-imaging python-virtualenv
apt-get -y --force-yes install python-gst-1.0 libjpeg8-dev sqlite3 libapache2-mod-fcgid gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-libav python-numpy python-scipy libsndfile1-dev
apt-get -y --force-yes install postgresql postgresql-client python-psycopg2 python-pip autotools-dev automake
apt-get -y install git-core python python-dev python-lxml python-imaging python-virtualenv
apt-get -y install python-gst-1.0 libjpeg8-dev sqlite3 libapache2-mod-fcgid gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-libav python-numpy python-scipy libsndfile1-dev
apt-get -y install postgresql postgresql-client python-psycopg2 python-pip autotools-dev automake
sudo -u postgres createuser -A -D mediagoblin
sudo -u postgres createdb -E UNICODE -O mediagoblin mediagoblin
@ -8071,7 +8071,7 @@ function install_mediagoblin {
add_ddns_domain
# see https://wiki.mediagoblin.org/Deployment / uwsgi with configs
apt-get -y --force-yes install uwsgi uwsgi-plugin-python nginx-full supervisor
apt-get -y install uwsgi uwsgi-plugin-python nginx-full supervisor
echo 'server {' > /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME
echo ' include /etc/nginx/mime.types;' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME
@ -8214,7 +8214,7 @@ function create_upgrade_script {
echo '#!/bin/bash' > /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo '' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo 'apt-get -y update' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo 'apt-get -y --force-yes upgrade' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo 'apt-get -y upgrade' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
if grep -Fxq "install_redmatrix" $COMPLETION_FILE; then
echo '' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
echo '# Red Matrix' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
@ -8271,8 +8271,8 @@ function intrusion_detection {
if grep -Fxq "intrusion_detection" $COMPLETION_FILE; then
return
fi
apt-get -y --force-yes install tripwire
apt-get -y --force-yes autoremove
apt-get -y install tripwire
apt-get -y autoremove
cd /etc/tripwire
cp site.key $DOMAIN_NAME-site.key
echo ''
@ -8306,7 +8306,7 @@ function create_tor_dongle {
return
fi
apt-get -y --force-yes install tor tor-arm
apt-get -y install tor tor-arm
# firewall
iptables -A INPUT -i usb0 -p tcp --dport 9050 -j ACCEPT
@ -8371,7 +8371,7 @@ function route_outgoing_traffic_through_tor {
if [[ $ROUTE_THROUGH_TOR != "yes" ]]; then
return
fi
apt-get -y --force-yes install tor tor-arm
apt-get -y install tor tor-arm
### set variables
# Destinations you don't want routed through Tor