Ver código fonte

Remove unsafe option --force-yes

Bob Mottram 10 anos atrás
pai
commit
f99b293962
1 arquivos alterados com 41 adições e 41 exclusões
  1. 41
    41
      src/freedombone

+ 41
- 41
src/freedombone Ver arquivo

@@ -1824,7 +1824,7 @@ function create_backup_script {
1824 1824
   if grep -Fxq "create_backup_script" $COMPLETION_FILE; then
1825 1825
       return
1826 1826
   fi
1827
-  apt-get -y --force-yes install rsyncrypto
1827
+  apt-get -y install rsyncrypto
1828 1828
 
1829 1829
   get_mariadb_password
1830 1830
   get_mariadb_gnusocial_admin_password
@@ -2333,7 +2333,7 @@ function create_restore_script {
2333 2333
   if grep -Fxq "create_restore_script" $COMPLETION_FILE; then
2334 2334
       return
2335 2335
   fi
2336
-  apt-get -y --force-yes install rsyncrypto
2336
+  apt-get -y install rsyncrypto
2337 2337
 
2338 2338
   get_mariadb_password
2339 2339
   get_mariadb_gnusocial_admin_password
@@ -2904,7 +2904,7 @@ function backup_to_friends_servers {
2904 2904
       return
2905 2905
   fi
2906 2906
 
2907
-  apt-get -y --force-yes install rsyncrypto sshpass
2907
+  apt-get -y install rsyncrypto sshpass
2908 2908
 
2909 2909
   get_mariadb_password
2910 2910
   get_mariadb_gnusocial_admin_password
@@ -3545,7 +3545,7 @@ function restore_from_friend {
3545 3545
       return
3546 3546
   fi
3547 3547
 
3548
-  apt-get -y --force-yes install rsyncrypto sshpass
3548
+  apt-get -y install rsyncrypto sshpass
3549 3549
 
3550 3550
   get_mariadb_password
3551 3551
   get_mariadb_gnusocial_admin_password
@@ -4085,7 +4085,7 @@ function enforce_good_passwords {
4085 4085
   if grep -Fxq "enforce_good_passwords" $COMPLETION_FILE; then
4086 4086
       return
4087 4087
   fi
4088
-  apt-get -y --force-yes install libpam-cracklib
4088
+  apt-get -y install libpam-cracklib
4089 4089
 
4090 4090
   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
4091 4091
   echo 'enforce_good_passwords' >> $COMPLETION_FILE
@@ -4304,7 +4304,7 @@ function change_debian_repos {
4304 4304
   fi
4305 4305
 
4306 4306
   apt-get update
4307
-  apt-get -y --force-yes install apt-transport-https
4307
+  apt-get -y install apt-transport-https
4308 4308
   echo 'change_debian_repos' >> $COMPLETION_FILE
4309 4309
 }
4310 4310
 
@@ -4515,7 +4515,7 @@ function random_number_generator {
4515 4515
       # On systems which are not beaglebones assume that
4516 4516
       # no hardware random number generator is available
4517 4517
       # and use the second best option
4518
-      apt-get -y --force-yes install haveged
4518
+      apt-get -y install haveged
4519 4519
       return
4520 4520
   fi
4521 4521
   if [[ $INSTALLED_WITHIN_DOCKER == "yes" ]]; then
@@ -4524,10 +4524,10 @@ function random_number_generator {
4524 4524
       return
4525 4525
   fi
4526 4526
   if [[ $USE_HWRNG == "yes" ]]; then
4527
-    apt-get -y --force-yes install rng-tools
4527
+    apt-get -y install rng-tools
4528 4528
     sed -i 's|#HRNGDEVICE=/dev/hwrng|HRNGDEVICE=/dev/hwrng|g' /etc/default/rng-tools
4529 4529
   else
4530
-    apt-get -y --force-yes install haveged
4530
+    apt-get -y install haveged
4531 4531
   fi
4532 4532
   echo 'random_number_generator' >> $COMPLETION_FILE
4533 4533
 }
@@ -4569,7 +4569,7 @@ function configure_ssh {
4569 4569
       echo "KexAlgorithms $SSH_KEX" >> /etc/ssh/sshd_config
4570 4570
   fi
4571 4571
 
4572
-  apt-get -y --force-yes install fail2ban
4572
+  apt-get -y install fail2ban
4573 4573
   echo 'configure_ssh' >> $COMPLETION_FILE
4574 4574
   # Don't reboot if installing within docker
4575 4575
   # random numbers will come from the host system
@@ -4661,11 +4661,11 @@ function time_synchronisation {
4661 4661
   if grep -Fxq "time_synchronisation" $COMPLETION_FILE; then
4662 4662
       return
4663 4663
   fi
4664
-  #apt-get -y --force-yes install tlsdate
4664
+  #apt-get -y install tlsdate
4665 4665
 
4666 4666
   # building tlsdate from source is a workaround because of
4667 4667
   # this bug https://github.com/ioerror/tlsdate/issues/130
4668
-  apt-get -y --force-yes install build-essential automake git pkg-config autoconf libtool libssl-dev libevent-dev
4668
+  apt-get -y install build-essential automake git pkg-config autoconf libtool libssl-dev libevent-dev
4669 4669
 
4670 4670
   if [ ! -d $INSTALL_DIR ]; then
4671 4671
       mkdir $INSTALL_DIR
@@ -5088,7 +5088,7 @@ function configure_email {
5088 5088
       return
5089 5089
   fi
5090 5090
   apt-get -y remove postfix
5091
-  apt-get -y --force-yes install exim4 sasl2-bin swaks libnet-ssleay-perl procmail
5091
+  apt-get -y install exim4 sasl2-bin swaks libnet-ssleay-perl procmail
5092 5092
 
5093 5093
   if [ ! -d /etc/exim4 ]; then
5094 5094
       echo "ERROR: Exim does not appear to have installed. $CHECK_MESSAGE"
@@ -5211,8 +5211,8 @@ function spam_filtering {
5211 5211
   if grep -Fxq "spam_filtering" $COMPLETION_FILE; then
5212 5212
       return
5213 5213
   fi
5214
-  apt-get -y --force-yes install exim4-daemon-heavy
5215
-  apt-get -y --force-yes install spamassassin
5214
+  apt-get -y install exim4-daemon-heavy
5215
+  apt-get -y install spamassassin
5216 5216
   sa-update -v
5217 5217
   sed -i 's/ENABLED=0/ENABLED=1/g' /etc/default/spamassassin
5218 5218
   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 {
5306 5306
   if grep -Fxq "configure_imap" $COMPLETION_FILE; then
5307 5307
       return
5308 5308
   fi
5309
-  apt-get -y --force-yes install dovecot-common dovecot-imapd
5309
+  apt-get -y install dovecot-common dovecot-imapd
5310 5310
 
5311 5311
   if [ ! -d /etc/dovecot ]; then
5312 5312
       echo "ERROR: Dovecot does not appear to have installed. $CHECK_MESSAGE"
@@ -5344,7 +5344,7 @@ function configure_gpg {
5344 5344
   if grep -Fxq "configure_gpg" $COMPLETION_FILE; then
5345 5345
       return
5346 5346
   fi
5347
-  apt-get -y --force-yes install gnupg
5347
+  apt-get -y install gnupg
5348 5348
 
5349 5349
   # if gpg keys directory was previously imported from usb
5350 5350
   if [[ $GPG_KEYS_IMPORTED == "yes" && -d /home/$MY_USERNAME/.gnupg ]]; then
@@ -5449,7 +5449,7 @@ function encrypt_incoming_email {
5449 5449
       return
5450 5450
   fi
5451 5451
   if [ ! -f /usr/bin/gpgit.pl ]; then
5452
-      apt-get -y --force-yes install git libmail-gnupg-perl
5452
+      apt-get -y install git libmail-gnupg-perl
5453 5453
       cd $INSTALL_DIR
5454 5454
       git clone https://github.com/mikecardwell/gpgit
5455 5455
       cd gpgit
@@ -5637,7 +5637,7 @@ function email_client {
5637 5637
   if grep -Fxq "email_client" $COMPLETION_FILE; then
5638 5638
       return
5639 5639
   fi
5640
-  apt-get -y --force-yes install mutt-patched lynx abook
5640
+  apt-get -y install mutt-patched lynx abook
5641 5641
 
5642 5642
   if [ ! -f /etc/Muttrc ]; then
5643 5643
       echo "ERROR: Mutt does not appear to have installed. $CHECK_MESSAGE"
@@ -5922,7 +5922,7 @@ function create_public_mailing_list {
5922 5922
 
5923 5923
   PUBLIC_MAILING_LIST_USER="mlmmj"
5924 5924
 
5925
-  apt-get -y --force-yes install mlmmj
5925
+  apt-get -y install mlmmj
5926 5926
   adduser --system $PUBLIC_MAILING_LIST_USER
5927 5927
   addgroup $PUBLIC_MAILING_LIST_USER
5928 5928
   adduser $PUBLIC_MAILING_LIST_USER $PUBLIC_MAILING_LIST_USER
@@ -6024,7 +6024,7 @@ function create_private_mailing_list {
6024 6024
       echo 'the top of the script'
6025 6025
       exit 11
6026 6026
   fi
6027
-  apt-get -y --force-yes install ruby ruby-dev ruby-gpgme libgpgme11-dev libmagic-dev
6027
+  apt-get -y install ruby ruby-dev ruby-gpgme libgpgme11-dev libmagic-dev
6028 6028
   gem install schleuder
6029 6029
   schleuder-fix-gem-dependencies
6030 6030
   schleuder-init-setup --gem
@@ -6126,7 +6126,7 @@ function install_web_server {
6126 6126
     rm -rf /etc/apache2
6127 6127
   fi
6128 6128
   # install nginx
6129
-  apt-get -y --force-yes install nginx php5-fpm git
6129
+  apt-get -y install nginx php5-fpm git
6130 6130
 
6131 6131
   # limit the number of php processes
6132 6132
   sed -i 's/; process.max = 128/process.max = 32/g' /etc/php5/fpm/php-fpm.conf
@@ -6247,8 +6247,8 @@ function install_mariadb {
6247 6247
   if grep -Fxq "install_mariadb" $COMPLETION_FILE; then
6248 6248
       return
6249 6249
   fi
6250
-  apt-get -y --force-yes install python-software-properties debconf-utils
6251
-  apt-get -y --force-yes install software-properties-common
6250
+  apt-get -y install python-software-properties debconf-utils
6251
+  apt-get -y install software-properties-common
6252 6252
   apt-get -y update
6253 6253
 
6254 6254
   get_mariadb_password
@@ -6268,7 +6268,7 @@ function install_mariadb {
6268 6268
 
6269 6269
   debconf-set-selections <<< "mariadb-server mariadb-server/root_password password $MARIADB_PASSWORD"
6270 6270
   debconf-set-selections <<< "mariadb-server mariadb-server/root_password_again password $MARIADB_PASSWORD"
6271
-  apt-get -y --force-yes install mariadb-server
6271
+  apt-get -y install mariadb-server
6272 6272
 
6273 6273
   if [ ! -d /etc/mysql ]; then
6274 6274
       echo "ERROR: mariadb-server does not appear to have installed. $CHECK_MESSAGE"
@@ -6485,7 +6485,7 @@ function install_owncloud {
6485 6485
           exit 6746
6486 6486
       fi
6487 6487
   fi
6488
-  apt-get -y --force-yes install owncloud
6488
+  apt-get -y install owncloud
6489 6489
   install_mariadb
6490 6490
   get_mariadb_password
6491 6491
 
@@ -6696,7 +6696,7 @@ function install_xmpp {
6696 6696
   if grep -Fxq "install_xmpp" $COMPLETION_FILE; then
6697 6697
       return
6698 6698
   fi
6699
-  apt-get -y --force-yes install prosody
6699
+  apt-get -y install prosody
6700 6700
 
6701 6701
   if [ ! -d /etc/prosody ]; then
6702 6702
       echo "ERROR: prosody does not appear to have installed. $CHECK_MESSAGE"
@@ -6820,7 +6820,7 @@ function install_irc_server {
6820 6820
   if grep -Fxq "install_irc_server" $COMPLETION_FILE; then
6821 6821
       return
6822 6822
   fi
6823
-  apt-get -y --force-yes install ngircd
6823
+  apt-get -y install ngircd
6824 6824
 
6825 6825
   if [ ! -d /etc/ngircd ]; then
6826 6826
       echo "ERROR: ngircd does not appear to have installed. $CHECK_MESSAGE"
@@ -6908,7 +6908,7 @@ function install_wiki {
6908 6908
   if [ ! $WIKI_DOMAIN_NAME ]; then
6909 6909
       return
6910 6910
   fi
6911
-  apt-get -y --force-yes install dokuwiki
6911
+  apt-get -y install dokuwiki
6912 6912
 
6913 6913
   if [ ! -d /var/www/$WIKI_DOMAIN_NAME ]; then
6914 6914
       mkdir /var/www/$WIKI_DOMAIN_NAME
@@ -7433,7 +7433,7 @@ function install_gnu_social {
7433 7433
   get_mariadb_password
7434 7434
   repair_databases_script
7435 7435
 
7436
-  apt-get -y --force-yes install php-gettext php5-curl php5-gd php5-mysql git curl php-xml-parser
7436
+  apt-get -y install php-gettext php5-curl php5-gd php5-mysql git curl php-xml-parser
7437 7437
 
7438 7438
   if [ ! -d /var/www/$MICROBLOG_DOMAIN_NAME ]; then
7439 7439
       mkdir /var/www/$MICROBLOG_DOMAIN_NAME
@@ -7679,7 +7679,7 @@ function install_redmatrix {
7679 7679
   get_mariadb_password
7680 7680
   repair_databases_script
7681 7681
 
7682
-  apt-get -y --force-yes install php5-common php5-cli php5-curl php5-gd php5-mysql php5-mcrypt git
7682
+  apt-get -y install php5-common php5-cli php5-curl php5-gd php5-mysql php5-mcrypt git
7683 7683
 
7684 7684
   if [ ! -d /var/www/$REDMATRIX_DOMAIN_NAME ]; then
7685 7685
       mkdir /var/www/$REDMATRIX_DOMAIN_NAME
@@ -7975,7 +7975,7 @@ function install_dlna_server {
7975 7975
   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
7976 7976
       return
7977 7977
   fi
7978
-  apt-get -y --force-yes install minidlna
7978
+  apt-get -y install minidlna
7979 7979
 
7980 7980
   if [ ! -f /etc/minidlna.conf ]; then
7981 7981
       echo "ERROR: minidlna does not appear to have installed. $CHECK_MESSAGE"
@@ -8034,9 +8034,9 @@ function install_mediagoblin {
8034 8034
   if [ ! $MEDIAGOBLIN_DOMAIN_NAME ]; then
8035 8035
       return
8036 8036
   fi
8037
-  apt-get -y --force-yes install git-core python python-dev python-lxml python-imaging python-virtualenv
8038
-  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
8039
-  apt-get -y --force-yes install postgresql postgresql-client python-psycopg2 python-pip autotools-dev automake
8037
+  apt-get -y install git-core python python-dev python-lxml python-imaging python-virtualenv
8038
+  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
8039
+  apt-get -y install postgresql postgresql-client python-psycopg2 python-pip autotools-dev automake
8040 8040
 
8041 8041
   sudo -u postgres createuser -A -D mediagoblin
8042 8042
   sudo -u postgres createdb -E UNICODE -O mediagoblin mediagoblin
@@ -8071,7 +8071,7 @@ function install_mediagoblin {
8071 8071
   add_ddns_domain
8072 8072
 
8073 8073
   # see https://wiki.mediagoblin.org/Deployment / uwsgi with configs
8074
-  apt-get -y --force-yes install uwsgi uwsgi-plugin-python nginx-full supervisor
8074
+  apt-get -y install uwsgi uwsgi-plugin-python nginx-full supervisor
8075 8075
 
8076 8076
   echo 'server {' > /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME
8077 8077
   echo '        include /etc/nginx/mime.types;' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME
@@ -8214,7 +8214,7 @@ function create_upgrade_script {
8214 8214
   echo '#!/bin/bash' > /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8215 8215
   echo '' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8216 8216
   echo 'apt-get -y update' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8217
-  echo 'apt-get -y --force-yes upgrade' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8217
+  echo 'apt-get -y upgrade' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8218 8218
   if grep -Fxq "install_redmatrix" $COMPLETION_FILE; then
8219 8219
       echo '' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
8220 8220
       echo '# Red Matrix' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
@@ -8271,8 +8271,8 @@ function intrusion_detection {
8271 8271
   if grep -Fxq "intrusion_detection" $COMPLETION_FILE; then
8272 8272
       return
8273 8273
   fi
8274
-  apt-get -y --force-yes install tripwire
8275
-  apt-get -y --force-yes autoremove
8274
+  apt-get -y install tripwire
8275
+  apt-get -y autoremove
8276 8276
   cd /etc/tripwire
8277 8277
   cp site.key $DOMAIN_NAME-site.key
8278 8278
   echo ''
@@ -8306,7 +8306,7 @@ function create_tor_dongle {
8306 8306
       return
8307 8307
   fi
8308 8308
 
8309
-  apt-get -y --force-yes install tor tor-arm
8309
+  apt-get -y install tor tor-arm
8310 8310
 
8311 8311
   # firewall
8312 8312
   iptables -A INPUT -i usb0 -p tcp --dport 9050 -j ACCEPT
@@ -8371,7 +8371,7 @@ function route_outgoing_traffic_through_tor {
8371 8371
   if [[ $ROUTE_THROUGH_TOR != "yes" ]]; then
8372 8372
       return
8373 8373
   fi
8374
-  apt-get -y --force-yes install tor tor-arm
8374
+  apt-get -y install tor tor-arm
8375 8375
 
8376 8376
   ### set variables
8377 8377
   # Destinations you don't want routed through Tor