Skip to content
Snippets Groups Projects
Commit f7963894 authored by Elisa Giglio's avatar Elisa Giglio
Browse files

aggiornamento db

parent 124271ad
Branches
No related tags found
No related merge requests found
{"soglia":30,"stato":0,"valore":0,"tempoAllarme":"2022-10-13T17:47:23.624881"}
\ No newline at end of file
{"soglia":30,"stato":1,"valore":0,"tempoAllarme":"2022-10-13T17:47:23.624881"}
\ No newline at end of file
No preview for this file type
......@@ -67,14 +67,14 @@ public class InstallHandler implements HttpHandler {
// chiamata sia anche amministratore del dominio
JSONArray arrUsers = j.getJSONArray("users");
DBC.insertAmministra(user, domain);
arrUsers.put("\"role\":\"A\",\"passwd\":\""+user+"\",\"user\":\"" + user + "\"");
j.put("users", arrUsers);
int i = 0;
while (i < arrUsers.length()) {
JSONObject userObj = arrUsers.getJSONObject(i);
i++;
int k = 0;
boolean didUserSetHimself = false;
while (k < arrUsers.length()) {
JSONObject userObj = arrUsers.getJSONObject(k);
k++;
String usr = userObj.getString("user");
if (user.equals(usr)) {//se l'utente e' colui che ha fatto la chiamata, l'ho gia' sistemato => passo al successivo
didUserSetHimself = true;
continue;
}
if (userObj.getString("role").equals("A")) {
......@@ -84,6 +84,10 @@ public class InstallHandler implements HttpHandler {
} else
System.err.println(userObj.toString());
}
if(!didUserSetHimself){
arrUsers.put(new JSONObject("{\"role\":\"A\",\"passwd\":\""+user+"\",\"user\":\"" + user + "\"}"));
j.put("users", arrUsers);
}
JSONArray arrServ = j.getJSONArray("services");// array con solo il nome dei servizi da installare
ArrayList<String> moduleHosts = new ArrayList<String>();
......
This diff is collapsed.
#!/bin/bash
cd keycloak-19.0.1 && bash keycloak.bash &
#cd scenariMicroservizio && bash scenari.bash &
#cd antifurtoMicroservizio && bash antifurto.bash &
#cd luciMicroservizio && bash luci.bash &
cd cloudAppManager && bash cloudappmanager.bash &
cd domainManager && bash domain.bash &
#cd domainManager && bash domain.bash &
cd webserver && bash server.bash &
# wait until <Ctrl>+C is pressed without then closing the process
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment