Install UFW only if needed

This commit is contained in:
e7d
2018-01-19 15:53:09 +01:00
parent 7451401980
commit d6cc30e9f5

View File

@@ -50,7 +50,11 @@ dockerize -template /etc/transmission/environment-variables.tmpl:/etc/transmissi
TRANSMISSION_CONTROL_OPTS="--script-security 2 --up-delay --up /etc/transmission/start.sh --down /etc/transmission/stop.sh" TRANSMISSION_CONTROL_OPTS="--script-security 2 --up-delay --up /etc/transmission/start.sh --down /etc/transmission/stop.sh"
if [ "true" = "$ENABLE_UFW" ]; then if [ "true" = "$ENABLE_UFW" ]; then
apk add --no-cache ufw@testing if [ ! -e ufw ]; then
echo "UFW not found, installing"
echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
apk add --no-cache ip6tables ufw@testing
fi
# Enable firewall # Enable firewall
echo "enabling firewall" echo "enabling firewall"