Skip to content

Commit

Permalink
Removed outdated typeset
Browse files Browse the repository at this point in the history
this fixes and closes #2095
  • Loading branch information
pkishino authored Dec 4, 2021
1 parent d53ab63 commit 76f7a2c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions openvpn/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ fi

## Open port to any address
function ufwAllowPort {
typeset -n portNum=${1}
portNum=${1}
if [[ "${ENABLE_UFW,,}" == "true" ]] && [[ -n "${portNum-}" ]]; then
echo "allowing ${portNum} through the firewall"
ufw allow ${portNum}
Expand All @@ -191,7 +191,8 @@ function ufwAllowPort {

## Open port to specific address.
function ufwAllowPortLong {
typeset -n portNum=${1} sourceAddress=${2}
portNum=${1}
sourceAddress=${2}

if [[ "${ENABLE_UFW,,}" == "true" ]] && [[ -n "${portNum-}" ]] && [[ -n "${sourceAddress-}" ]]; then
echo "allowing ${sourceAddress} through the firewall to port ${portNum}"
Expand Down

1 comment on commit 76f7a2c

@edgd1er
Copy link
Contributor

@edgd1er edgd1er commented on 76f7a2c Dec 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,
I'm sorry I'm afraid I'm responsible for all this fuss. After investigating the reason, I realised that typeset -n NAME=REF will set NAME with the value pointed by REF. There was no error to begin with.

Please sign in to comment.