Charles Reid 1 year ago
parent
commit
1d70d1f5f9
3 changed files with 27 additions and 27 deletions
  1. 8
    8
      build_mongodb.sh
  2. 9
    9
      close_fw.sh
  3. 10
    10
      open_fw.sh

+ 8
- 8
build_mongodb.sh View File

@@ -13,19 +13,19 @@
13 13
 # https://charlesreid1.com/wiki/Docker/Dockerfiles
14 14
 
15 15
 function usage {
16
-	echo ""
17
-	echo "build_mongodb.sh script:"
18
-	echo "builds a MongoDB docker container."
19
-	echo ""
20
-	echo "        ./build_mongodb.sh"
21
-	echo ""
16
+    echo ""
17
+    echo "build_mongodb.sh script:"
18
+    echo "builds a MongoDB docker container."
19
+    echo ""
20
+    echo "        ./build_mongodb.sh"
21
+    echo ""
22 22
 }
23 23
 
24 24
 if [[ "$#" -ne 0 ]];
25 25
 then
26
-	usage
26
+    usage
27 27
 else
28 28
 
29
-	docker build -t jupitermongo .
29
+    docker build -t jupitermongo .
30 30
 
31 31
 fi

+ 9
- 9
close_fw.sh View File

@@ -5,22 +5,22 @@
5 5
 # or the server that runs the docker stunnel container.
6 6
 
7 7
 function usage {
8
-	echo ""
9
-	echo "close_fw.sh script:"
10
-	echo "opens the firewall to a particular port using iptables."
11
-	echo "specify a port number for the firewall to open:"
12
-	echo ""
13
-	echo "        ./close_fw.sh 666"
14
-	echo ""
8
+    echo ""
9
+    echo "close_fw.sh script:"
10
+    echo "opens the firewall to a particular port using iptables."
11
+    echo "specify a port number for the firewall to open:"
12
+    echo ""
13
+    echo "        ./close_fw.sh 666"
14
+    echo ""
15 15
 }
16 16
 
17 17
 
18 18
 if [[ "$#" -ne 1 || $1 =~ "[0-9]\{1,5\}" ]];
19 19
 then
20
-	usage
20
+    usage
21 21
 else
22 22
 
23
-	iptables -A INPUT -p tcp --dport ${1} -j DROP 
23
+    iptables -A INPUT -p tcp --dport ${1} -j DROP 
24 24
 
25 25
 fi
26 26
 

+ 10
- 10
open_fw.sh View File

@@ -5,23 +5,23 @@
5 5
 # or the server that runs the docker stunnel container.
6 6
 
7 7
 function usage {
8
-	echo ""
9
-	echo "open_fw.sh script:"
10
-	echo "opens the firewall to a particular port using iptables."
11
-	echo "specify a port number for the firewall to open:"
12
-	echo ""
13
-	echo "        ./open_fw.sh 666"
14
-	echo ""
8
+    echo ""
9
+    echo "open_fw.sh script:"
10
+    echo "opens the firewall to a particular port using iptables."
11
+    echo "specify a port number for the firewall to open:"
12
+    echo ""
13
+    echo "        ./open_fw.sh 666"
14
+    echo ""
15 15
 }
16 16
 
17 17
 
18 18
 if [[ "$#" -ne 1 || $1 =~ "[0-9]\{1,5\}" ]];
19 19
 then
20
-	usage
20
+    usage
21 21
 else
22 22
 
23
-	iptables -A INPUT -p tcp --dport ${1} -j ACCEPT
24
-	iptables -A FORWARD -p tcp -j ACCEPT --dport ${1} -m state --state NEW
23
+    iptables -A INPUT -p tcp --dport ${1} -j ACCEPT
24
+    iptables -A FORWARD -p tcp -j ACCEPT --dport ${1} -m state --state NEW
25 25
 
26 26
 fi
27 27