Bob Mottram 10 years ago
parent
commit
87cffc1e1b
1 changed files with 14 additions and 14 deletions
  1. 14
    14
      install-freedombone.sh

+ 14
- 14
install-freedombone.sh View File

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