ClearXslCache=no
DirectOpenposting=yes
+
+#use rsync to mirror the website to a remote-host
+Rsync=no
+Rsync.Script.Path=/var/www/bin/rsync-copy
+
StandardLanguage=de
# the directory where the html-files will be saved
Xsl.OpenList=producer/open.xsl
Xsl.Wap=producer/wml2.xsl
-Sync.Script.Path=/var/www/bin/rsync-copy
+
* rsync the webrepository
* needs a rsyncscript
* returns the exit-code
+ * returns 255 if rsync should not be used
*/
public static int rsync(){
- Process p;
+ if(!Configuration.getProperty("Rsync").toLowerCase().equals("yes")){
+ return 255;
+ }
+
+ Process p;
int returnValue = -1;
try {
Runtime run = Runtime.getRuntime();
- p = run.exec(Configuration.getProperty("Sync.Script.Path"));
+ p = run.exec(Configuration.getProperty("Rsync.Script.Path"));
returnValue = p.waitFor();
} catch (IOException e) {
return returnValue;
}
return returnValue;
}
-}
\ No newline at end of file
+}
// sync the server
int exitValue = Helper.rsync();
+ theLog.printDebugInfo("rsync:"+exitValue);
// redirecting to url
// should implement back to article
// sync the server
//should be configureable
int exitValue = Helper.rsync();
+ theLog.printDebugInfo("rsync: "+exitValue);
}
catch (IOException e) { throw new ServletModuleException(e.toString());}