*) added check if archive for update is OK, install if OK, else just restart (http://forum.yacy-websuche.de/viewtopic.php?t=663)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4297 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
low012 17 years ago
parent 21b92e8e64
commit 408cb7a29b

@ -405,12 +405,18 @@ public final class yacyVersion implements Comparator, Comparable {
String script =
"#!/bin/sh" + serverCore.LF_STRING +
"cd " + sb.getRootPath() + "/DATA/RELEASE/" + serverCore.LF_STRING +
"if gunzip -t " + release + serverCore.LF_STRING +
"then" + serverCore.LF_STRING +
"gunzip -c " + release + " | tar xf -" + serverCore.LF_STRING +
"while [ -f ../yacy.running ]; do" + serverCore.LF_STRING +
"sleep 1" + serverCore.LF_STRING +
"done" + serverCore.LF_STRING +
"cp -Rf yacy/* ../../" + serverCore.LF_STRING +
"rm -Rf yacy" + serverCore.LF_STRING +
"else" + serverCore.LF_STRING +
"while [ -f ../yacy.running ]; do" + serverCore.LF_STRING +
"sleep 1" + serverCore.LF_STRING +
"fi" + serverCore.LF_STRING +
"cd ../../" + serverCore.LF_STRING +
"nohup ./startYACY.sh > /dev/null" + serverCore.LF_STRING;
File scriptFile = new File(sb.getRootPath(), "DATA/RELEASE/update.sh");

Loading…
Cancel
Save