<commit_before>#!/bin/bash

set -x

echo "Container : ${CONTAINER_ID}"

dockerex() {
  docker exec -t -i ${CONTAINER_ID} $*
}

# Setup diversion for executable so that they always exit gracefully
dockerdivertexe() {
  dockerex dpkg-divert --rename $1
  dockerex ln -s /bin/true $1
}

# Docker handles the firewall itself, and we don't really care here
dockerdivertexe /sbin/iptables
dockerdivertexe /sbin/ip6tables
# dovecot fails to start in the container (TODO : figure out why)
dockerdivertexe /etc/init.d/dovecot
# avahi-daemon fails to start in the container (TODO : figure out why)
dockerdivertexe /etc/init.d/avahi-daemon
# systemctl is used directly by yunohost to restart some services,
# and this generates 'Failed to get D-Bus connection: Unknown error -1'
# let's make it quiet
dockerdivertexe /bin/systemctl

# Temporary FIX: try to not use "tr" to avoid https://dev.yunohost.org/issues/149
dockerex sed -i 's@randpass 10 0@openssl rand -base64 16@g' /usr/share/yunohost/hooks/conf_regen/34-mysql<commit_msg>Yet another attempt to fix sed call<commit_after>#!/bin/bash

set -x

echo "Container : ${CONTAINER_ID}"

dockerex() {
  docker exec -t -i ${CONTAINER_ID} $*
}

# Setup diversion for executable so that they always exit gracefully
dockerdivertexe() {
  dockerex dpkg-divert --rename $1
  dockerex ln -s /bin/true $1
}

# Docker handles the firewall itself, and we don't really care here
dockerdivertexe /sbin/iptables
dockerdivertexe /sbin/ip6tables
# dovecot fails to start in the container (TODO : figure out why)
dockerdivertexe /etc/init.d/dovecot
# avahi-daemon fails to start in the container (TODO : figure out why)
dockerdivertexe /etc/init.d/avahi-daemon
# systemctl is used directly by yunohost to restart some services,
# and this generates 'Failed to get D-Bus connection: Unknown error -1'
# let's make it quiet
dockerdivertexe /bin/systemctl

# Temporary FIX: try to not use "tr" to avoid https://dev.yunohost.org/issues/149
dockerex sed -i \"s@randpass 10 0@openssl rand -base64 16@g\" /usr/share/yunohost/hooks/conf_regen/34-mysql
{'fraction_non_alphanumeric': 0.09777347531461762, 'fraction_numerical': 0.015488867376573089, 'mean_word_length': 4.286445012787723, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '3556161', 'n_tokens_mistral': 784, 'n_tokens_neox': 716, 'n_words': 245}