Ver código fonte

Few small freebsd fixes (#319)

* Use python 3.7 which is the default.

* Fix typo (missing space before closing ]):

00:04:22.942  + [ -f /usr/ports/UPDATING]
00:04:22.942  [: missing ]

* GC unneded "cd resource". php.sh is included into resources/ngnix.sh, which does
cd resources as the first step by itself.
Maksym Sobolyev 5 anos atrás
pai
commit
f6ce7e9ae5
3 arquivos alterados com 2 adições e 5 exclusões
  1. 1 1
      freebsd/install.sh
  2. 1 1
      freebsd/resources/fail2ban.sh
  3. 0 3
      freebsd/resources/php.sh

+ 1 - 1
freebsd/install.sh

@@ -14,7 +14,7 @@ pkg upgrade --yes
 
 
 #Update the ports
 #Update the ports
 if [ .$portsnap_enabled = .'true' ]; then
 if [ .$portsnap_enabled = .'true' ]; then
-	if [ -f /usr/ports/UPDATING]; then
+	if [ -f /usr/ports/UPDATING ]; then
 		portsnap fetch && portsnap update
 		portsnap fetch && portsnap update
 		echo "/usr/ports updated"
 		echo "/usr/ports updated"
 	else
 	else

+ 1 - 1
freebsd/resources/fail2ban.sh

@@ -11,7 +11,7 @@ cd "$(dirname "$0")"
 verbose "Installing Fail2ban"
 verbose "Installing Fail2ban"
 
 
 #add the dependencies
 #add the dependencies
-pkg install --yes py27-fail2ban
+pkg install --yes py37-fail2ban
 
 
 #enable fail2ban service
 #enable fail2ban service
 echo 'fail2ban_enable="YES"' >> /etc/rc.conf
 echo 'fail2ban_enable="YES"' >> /etc/rc.conf

+ 0 - 3
freebsd/resources/php.sh

@@ -1,8 +1,5 @@
 #!/bin/sh
 #!/bin/sh
 
 
-#move to script directory so all relative paths work
-cd "$(dirname "$0")"
-
 #includes
 #includes
 . ./config.sh
 . ./config.sh
 . ./colors.sh
 . ./colors.sh