From 2c8c51ce4bc77c918387b5f8ee89069dfb716ce1 Mon Sep 17 00:00:00 2001 From: reger Date: Mon, 24 Feb 2014 23:19:17 +0100 Subject: [PATCH] make use of new -config cmd-line parameter in reconfgureYACY.sh to asure pwd encoding is compatible with DIGEST auth. in future. --- reconfigureYACY.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) mode change 100755 => 100644 reconfigureYACY.sh diff --git a/reconfigureYACY.sh b/reconfigureYACY.sh old mode 100755 new mode 100644 index 76ec8447c..785e4c83d --- a/reconfigureYACY.sh +++ b/reconfigureYACY.sh @@ -121,10 +121,7 @@ change_admin_password() echo 'Entries did not match, please try again.' change_admin_password else - BASE64=`$JAVA -classpath lib/yacycore.jar net.yacy.cora.order.Base64Order -es "$USERNAME:$INPUT1"` - B64MD5=`$JAVA -classpath lib/yacycore.jar net.yacy.cora.order.Digest -strfhex "$BASE64"` - B64MD5=`echo $B64MD5 | sed "s/\(\S\) .*/\1/"` - replace_parameter 'adminAccountBase64MD5' "$B64MD5" + replace_parameter 'adminAccount' "$USERNAME:$INPUT1" fi STATUS='Admin password has been changed.' @@ -272,8 +269,7 @@ read_parameter() # REPLACES THE VALUE OF A PARAMETER (FIRST ARGUMENT) WITH A NEW ONE (SECOND ARGUMENT) replace_parameter() { - sed "s/^\($1 *=\)\(.*\)/\1$2/" "$CONFIGFILE" >"$SETTINGSDIR/yacy.tmp" - mv "$SETTINGSDIR/yacy.tmp" "$CONFIGFILE" + $JAVA -classpath lib/yacycore.jar net.yacy.yacy -config "$1=$2" 2>/dev/null } #