<commit_before>#!/bin/bash
#Creation d'utlisateur pureftpd
if [[ -z "$1" ]]; then
	echo "Rappel sur l'utilisation de la commande : $0 Username home password" 1>&2
	exit 1
fi
if [[ -z "$2" ]]; then
	echo "Rappel sur l'utilisation de la commande : $0 Username home password" 1>&2
	exit 1
fi
if [[ -z "$3" ]]; then
	echo "Rappel sur l'utilisation de la commande : $0 Username home password" 1>&2
	exit 1
fi

ftpdpasswd=`cat $PWD/pureftpdpasswd\`
Username="$1"
Directory="$2"
Password="$3"

echo "use pureftpd;" > insertftpduser.sql
echo "INSERT INTO \`ftpd\` (\`User\`, \`status\`, \`Password\`, \`Uid\`, \`Gid\`, \`Dir\`, \`ULBandwidth\`, \`DLBandwidth\`, \`comment\`, \`ipaccess\`, \`QuotaSize\`, \`QuotaFiles\`) VALUES ('$Username', '1', MD5('$Password'), '33', '33', '$Directory', '0', '0', '', '*', '0', '0');" >> insertftpduser.sql

mysql -u pureftpd -p$ftpdpasswd < insertftpduser.sql<commit_msg>Update insertftpduser.bash<commit_after>#!/bin/bash
#Creation d'utlisateur pureftpd
if [[ -z "$1" ]]; then
	echo "Rappel sur l'utilisation de la commande : $0 Username home password" 1>&2
	exit 1
fi
if [[ -z "$2" ]]; then
	echo "Rappel sur l'utilisation de la commande : $0 Username home password" 1>&2
	exit 1
fi
if [[ -z "$3" ]]; then
	echo "Rappel sur l'utilisation de la commande : $0 Username home password" 1>&2
	exit 1
fi

ftpdpasswd=`cat $PWD/pureftpdpasswd`
Username="$1"
Directory="$2"
Password="$3"

echo "use pureftpd;" > insertftpduser.sql
echo "INSERT INTO \`ftpd\` (\`User\`, \`status\`, \`Password\`, \`Uid\`, \`Gid\`, \`Dir\`, \`ULBandwidth\`, \`DLBandwidth\`, \`comment\`, \`ipaccess\`, \`QuotaSize\`, \`QuotaFiles\`) VALUES ('$Username', '1', MD5('$Password'), '33', '33', '$Directory', '0', '0', '', '*', '0', '0');" >> insertftpduser.sql

mysql -u pureftpd -p$ftpdpasswd < insertftpduser.sql
{'fraction_non_alphanumeric': 0.2196467991169978, 'fraction_numerical': 0.03090507726269316, 'mean_word_length': 4.527439024390244, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '7444167', 'n_tokens_mistral': 751, 'n_tokens_neox': 717, 'n_words': 206}