<commit_before>#!/bin/bash -e

function install()
{
    installAptGetPackages 'ufw'

    # Set Up Policies

    ufw --force reset
    ufw default deny incoming
    ufw default allow outgoing

    local policy=''

    for policy in "${ufwPolicies[@]}"
    do
        ufw ${policy}
    done

    # Enable Service

    ufw --force enable
    ufw status verbose
}

function main()
{
    local appPath="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

    source "${appPath}/../../../libraries/util.bash"
    source "${appPath}/../attributes/default.bash"

    checkRequireSystem
    checkRequireRootUser

    header 'INSTALLING UFW'<commit_msg>bash best practice<commit_after>#!/bin/bash -e

function install()
{
    installAptGetPackages 'ufw'

    # Set Up Policies

    ufw --force reset
    ufw default deny incoming
    ufw default allow outgoing

    local policy=''

    for policy in "${ufwPolicies[@]}"
    do
        local rule=(${policy})

        ufw "${rule[@]}"
    done

    # Enable Service

    ufw --force enable
    ufw status verbose
}

function main()
{
    local appPath="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

    source "${appPath}/../../../libraries/util.bash"
    source "${appPath}/../attributes/default.bash"

    checkRequireSystem
    checkRequireRootUser

    header 'INSTALLING UFW'
{'fraction_non_alphanumeric': 0.14036418816388468, 'fraction_numerical': 0.0015174506828528073, 'mean_word_length': 2.6236263736263736, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4380195', 'n_tokens_mistral': 440, 'n_tokens_neox': 403, 'n_words': 111}