Bob Mottram 10 år sedan
förälder
incheckning
87cffc1e1b
1 ändrade filer med 14 tillägg och 14 borttagningar
  1. 14
    14
      install-freedombone.sh

+ 14
- 14
install-freedombone.sh Visa fil

@@ -144,7 +144,7 @@ function change_login_message {
144 144
   echo "|    |   (.-' (.-' (   | (   )|  |  | |   )(   )|  | (.-' " >> /etc/motd
145 145
   echo "'    '     --'  --'  -' -  -' '  '   -' -'   -' '   -  --'" >> /etc/motd
146 146
 
147
-  if [ $SYSTEM_TYPE == "cloud" ]; then
147
+  if [[ $SYSTEM_TYPE == "cloud" ]]; then
148 148
       echo '                  .--..             . ' >> /etc/motd
149 149
       echo '                 :    |             | ' >> /etc/motd
150 150
       echo '                 |    | .-. .  . .-.| ' >> /etc/motd
@@ -152,7 +152,7 @@ function change_login_message {
152 152
       echo "                   --' - -'  -- - -' -" >> /etc/motd
153 153
   fi
154 154
 
155
-  if [ $SYSTEM_TYPE == "chat" ]; then
155
+  if [[ $SYSTEM_TYPE == "chat" ]]; then
156 156
       echo '                  .--..         .   ' >> /etc/motd
157 157
       echo '                 :    |        _|_  ' >> /etc/motd
158 158
       echo '                 |    |--. .-.  |   ' >> /etc/motd
@@ -160,7 +160,7 @@ function change_login_message {
160 160
       echo "                   --''   - -' - -' " >> /etc/motd
161 161
   fi
162 162
 
163
-  if [ $SYSTEM_TYPE == "social" ]; then
163
+  if [[ $SYSTEM_TYPE == "social" ]]; then
164 164
       echo '               .-.                    .  ' >> /etc/motd
165 165
       echo '              (   )           o       |  ' >> /etc/motd
166 166
       echo '                -.  .-.  .-.  .  .-.  |  ' >> /etc/motd
@@ -326,7 +326,7 @@ function update_the_kernel {
326 326
   if grep -Fxq "update_the_kernel" $COMPLETION_FILE; then
327 327
       return
328 328
   fi
329
-  if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
329
+  if [[ $INSTALLED_WITHIN_DOCKER == "yes" ]]; then
330 330
       return
331 331
   fi
332 332
   cd /opt/scripts/tools
@@ -338,7 +338,7 @@ function enable_zram {
338 338
   if grep -Fxq "enable_zram" $COMPLETION_FILE; then
339 339
       return
340 340
   fi
341
-  if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
341
+  if [[ $INSTALLED_WITHIN_DOCKER == "yes" ]]; then
342 342
       return
343 343
   fi
344 344
   if ! grep -q "options zram num_devices=1" /etc/modprobe.d/zram.conf; then
@@ -420,12 +420,12 @@ function random_number_generator {
420 420
   if grep -Fxq "random_number_generator" $COMPLETION_FILE; then
421 421
       return
422 422
   fi
423
-  if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
423
+  if [[ $INSTALLED_WITHIN_DOCKER == "yes" ]]; then
424 424
       # it is assumed that docker uses the random number
425 425
       # generator of the host system
426 426
       return
427 427
   fi
428
-  if [ $USE_HWRNG == "yes" ]; then
428
+  if [[ $USE_HWRNG == "yes" ]]; then
429 429
     apt-get -y --force-yes install rng-tools
430 430
     sed -i 's|#HRNGDEVICE=/dev/hwrng|HRNGDEVICE=/dev/hwrng|g' /etc/default/rng-tools
431 431
   else
@@ -612,7 +612,7 @@ function configure_firewall {
612 612
   if grep -Fxq "configure_firewall" $COMPLETION_FILE; then
613 613
       return
614 614
   fi
615
-  if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
615
+  if [[ $INSTALLED_WITHIN_DOCKER == "yes" ]]; then
616 616
       # docker does its own firewalling
617 617
       return
618 618
   fi
@@ -642,7 +642,7 @@ function configure_firewall_for_dns {
642 642
   if grep -Fxq "configure_firewall_for_dns" $COMPLETION_FILE; then
643 643
       return
644 644
   fi
645
-  if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
645
+  if [[ $INSTALLED_WITHIN_DOCKER == "yes" ]]; then
646 646
       # docker does its own firewalling
647 647
       return
648 648
   fi
@@ -655,7 +655,7 @@ function configure_firewall_for_ftp {
655 655
   if grep -Fxq "configure_firewall_for_ftp" $COMPLETION_FILE; then
656 656
       return
657 657
   fi
658
-  if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
658
+  if [[ $INSTALLED_WITHIN_DOCKER == "yes" ]]; then
659 659
       # docker does its own firewalling
660 660
       return
661 661
   fi
@@ -668,7 +668,7 @@ function configure_firewall_for_web {
668 668
   if grep -Fxq "configure_firewall_for_web" $COMPLETION_FILE; then
669 669
       return
670 670
   fi
671
-  if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
671
+  if [[ $INSTALLED_WITHIN_DOCKER == "yes" ]]; then
672 672
       # docker does its own firewalling
673 673
       return
674 674
   fi
@@ -682,7 +682,7 @@ function configure_firewall_for_ssh {
682 682
   if grep -Fxq "configure_firewall_for_ssh" $COMPLETION_FILE; then
683 683
       return
684 684
   fi
685
-  if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
685
+  if [[ $INSTALLED_WITHIN_DOCKER == "yes" ]]; then
686 686
       # docker does its own firewalling
687 687
       return
688 688
   fi
@@ -696,7 +696,7 @@ function configure_firewall_for_git {
696 696
   if grep -Fxq "configure_firewall_for_git" $COMPLETION_FILE; then
697 697
       return
698 698
   fi
699
-  if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
699
+  if [[ $INSTALLED_WITHIN_DOCKER == "yes" ]]; then
700 700
       # docker does its own firewalling
701 701
       return
702 702
   fi
@@ -709,7 +709,7 @@ function configure_firewall_for_email {
709 709
   if grep -Fxq "configure_firewall_for_email" $COMPLETION_FILE; then
710 710
       return
711 711
   fi
712
-  if [ $INSTALLED_WITHIN_DOCKER == "yes" ]; then
712
+  if [[ $INSTALLED_WITHIN_DOCKER == "yes" ]]; then
713 713
       # docker does its own firewalling
714 714
       return
715 715
   fi