add service name in the env variable

This commit is contained in:
Chai Feng 2018-10-05 18:05:20 +08:00
parent 7e659b23c9
commit 8712595939
No known key found for this signature in database
GPG key ID: 2DCD9A24E523FFD2
2 changed files with 13 additions and 6 deletions

View file

@ -23,7 +23,7 @@ function update-ufw-rules() {
-e 's/="/ /' \
-e 's/"$//' |
while read id port; do
ufw-allow-or-deny-service "${id}" "${port}"
ufw-allow-or-deny-service "${id}" "${port%*/}"
done
}