<commit_before>function unit_cleanup() {
    PRINT "+" "Deleting incomplete systemd unit..."
    rm -f "/etc/systemd/system/$SERVICE"
    systemctl daemon-reload
}
trap unit_cleanup ERR

unit_start()
{
    /usr/bin/systemctl daemon-reload
    /usr/bin/systemctl enable "$1"
    /usr/bin/systemctl start "$1"
}

unit_install()
{
    cp "$1" /etc/systemd/system
}

unit_active()
{
    /usr/bin/systemctl is-active "$1" && return 0
    return 1
}

unit_image()
{
    iid=$(/usr/bin/podman images | grep -F -- "${1} " | awk '{print $3}')
    echo "$iid"
    sed -i "s|__IMAGE__|$iid|" "/etc/systemd/system/${2}"
}

unit_stop()
{
    /usr/bin/systemctl stop "$1" 2>&1 >/dev/null || return 0
}<commit_msg>rerun.lib: Handled specification of tags.<commit_after>function unit_cleanup() {
    PRINT "+" "Deleting incomplete systemd unit..."
    rm -f "/etc/systemd/system/$SERVICE"
    systemctl daemon-reload
}
trap unit_cleanup ERR

unit_start()
{
    /usr/bin/systemctl daemon-reload
    /usr/bin/systemctl enable "$1"
    /usr/bin/systemctl start "$1"
}

unit_install()
{
    cp "$1" /etc/systemd/system
}

unit_active()
{
    /usr/bin/systemctl is-active "$1" && return 0
    return 1
}

unit_image()
{
    name=$(cut -f1 -d: <<< "${1}")
    tag=$(cut -f2 -d: <<< "${1}")
    [ "$name" = "$tag" ] && tag="latest"
    iid=$(/usr/bin/podman images | grep -F -- "${name} " | grep "$tag" | awk '{print $3}')
    echo "$iid"
    sed -i "s|__IMAGE__|$iid|" "/etc/systemd/system/${2}"
}

unit_stop()
{
    /usr/bin/systemctl stop "$1" 2>&1 >/dev/null || return 0
}
{'fraction_non_alphanumeric': 0.19896973599484868, 'fraction_numerical': 0.018673535093367676, 'mean_word_length': 2.9341772151898735, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '2241062', 'n_tokens_mistral': 623, 'n_tokens_neox': 609, 'n_words': 135}