This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// handles response from the Read MIFARE Data message | |
post(new Route(Constants.readBlockCallbackUrl) { | |
@Override | |
public Object handle(Request request, Response response) { | |
JSONObject jsonParameters = (JSONObject) JSONValue.parse(request.body()); | |
String operationId = (String) jsonParameters.get("operationId"); | |
String sessionId = pendingOperations.get(operationId); | |
pendingOperations.remove(operationId); | |
int statusCode = ((Long)jsonParameters.get("statusCode")).intValue(); | |
if (statusCode != HTTP_OK) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TARGET="/backup/mysql" | |
egrep -v "^(#|\\s*$)" /etc/duply/default/enabledDBs | while read DATABASE ; do | |
# this works securly for all tables in this database. It locks all tables (no read or write) and dumps them. | |
# Inculding creat db-statment. The quick options dumps to ram, and flushes then. This leads to less locktime. | |
mysqldump --lock-tables --quick --databases ${DATABASE} | gzip > ${TARGET}/${DATABASE}.mysql.gz | |
done |