diff --git a/installer/get.sh b/installer/get.sh index c4f9334..23b8678 100644 --- a/installer/get.sh +++ b/installer/get.sh @@ -1,4 +1,5 @@ #!/bin/bash +#

 
 # This is a 3 step process
 #   1. First we need to figure out whether to use wget or curl for fetching remote files
@@ -126,6 +127,15 @@ echo "Creating link to 'greenlock' in /usr/local/bin"
 echo "sudo ln -sf $GREENLOCK_PATH/bin/greenlock /usr/local/bin/greenlock"
 sudo ln -sf $GREENLOCK_PATH/bin/greenlock /usr/local/bin/greenlock
 
+set +e
+if type -p setcap >/dev/null 2>&1; then
+  echo ""
+  echo "Setting permissions to allow Greenlock to run on port 80"
+  echo "sudo setcap cap_net_bind_service=+ep $GREENLOCK_PATH/bin/node"
+  sudo setcap cap_net_bind_service=+ep $GREENLOCK_PATH/bin/node
+fi
+set -e
+
 echo ""
 echo ""
 echo "Installed successfully. Try it out:"