mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 10:20:26 +00:00
Commit for ken to fix DProc issues
This commit is contained in:
@@ -48,7 +48,7 @@ sysadm_start()
|
||||
ssl_keygen
|
||||
echo "Starting sysadm..."
|
||||
command="/usr/local/bin/sysadm-server"
|
||||
daemon -r -p /var/run/sysadm.pid $command $flags >/dev/null 2>/dev/null
|
||||
daemon -p /var/run/sysadm.pid $command $flags >/dev/null 2>/dev/null
|
||||
chmod 744 /var/run/sysadm.pid >/dev/null 2>/dev/null
|
||||
}
|
||||
|
||||
|
||||
@@ -127,6 +127,7 @@ DProcess* Dispatcher::queueProcess(Dispatcher::PROC_QUEUE queue, QString ID, QSt
|
||||
//For multi-threading, need to emit a signal/slot for this action (object creations need to be in same thread as parent)
|
||||
qDebug() << "Queue Process:" << queue << ID << cmds;
|
||||
DProcess *P = createProcess(ID, cmds);
|
||||
connect(this, SIGNAL(mkProcs(Dispatcher::PROC_QUEUE, DProcess*)), this, SLOT(mkProcs(Dispatcher::PROC_QUEUE, DProcess*)) );
|
||||
emit mkProcs(queue, P);
|
||||
return P;
|
||||
}
|
||||
|
||||
@@ -584,10 +584,14 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmIohyveRequest(const QJsonVal
|
||||
}
|
||||
if(act=="fetchiso"){
|
||||
ok = true;
|
||||
DProcess *fetchproc;
|
||||
out->insert("fetchiso", sysadm::Iohyve::fetchISO(in_args.toObject(), fetchproc));
|
||||
connect(fetchproc, SIGNAL(ProcessOutput(QString)), this, SLOT(slotIohyveFetchProcessOutput(QString)) );
|
||||
connect(fetchproc, SIGNAL(Finished(QString, int, QString)), this, SLOT(slotIohyveFetchDone(QString, int, QString)) );
|
||||
DProcess fetchproc;
|
||||
qDebug() << "Before fetchiso";
|
||||
out->insert("fetchiso", sysadm::Iohyve::fetchISO(in_args.toObject(), &fetchproc));
|
||||
//qDebug() << "fetchProc: " << fetchproc;
|
||||
qDebug() << "After fetchiso";
|
||||
connect(&fetchproc, SIGNAL(ProcessOutput(QString)), this, SLOT(slotIohyveFetchProcessOutput(QString)) );
|
||||
connect(&fetchproc, SIGNAL(Finished(QString, int, QString)), this, SLOT(slotIohyveFetchDone(QString, int, QString)) );
|
||||
qDebug() << "After fetchiso again";
|
||||
}
|
||||
if(act=="install"){
|
||||
ok = true;
|
||||
|
||||
@@ -61,6 +61,7 @@ QJsonObject Iohyve::fetchISO(QJsonObject jsin, DProcess *returnproc) {
|
||||
|
||||
// Queue the fetch action
|
||||
returnproc = DISPATCHER->queueProcess(ID, "iohyve fetch " + url);
|
||||
qDebug() << "returnproc" << returnproc;
|
||||
|
||||
// Return some details to user that the action was queued
|
||||
retObject.insert("command", "iohyve fetch " + url);
|
||||
|
||||
Reference in New Issue
Block a user