mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-07 01:13:50 +02:00
2021-05-28 Fred Gleason <fredg@paravelsystems.com>
* Added an '--force-system-maintenance' switch to rdservice(8). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
3186005094
commit
37083a0d2e
@ -20763,3 +20763,5 @@
|
||||
* Added an '--initial-maintenance' switch to rdservice(8).
|
||||
2021-05-28 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added an 'RDProcess::prettyCommandString()' method.
|
||||
2021-05-28 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added an '--force-system-maintenance' switch to rdservice(8).
|
||||
|
@ -77,8 +77,9 @@ void MainObject::checkMaintData()
|
||||
//
|
||||
// Run the routines
|
||||
//
|
||||
if(run) {
|
||||
if(run||svc_force_system_maintenance) {
|
||||
RunSystemMaintRoutine();
|
||||
svc_force_system_maintenance=false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,6 +61,7 @@ MainObject::MainObject(QObject *parent)
|
||||
bool ok=false;
|
||||
|
||||
svc_startup_target=MainObject::TargetAll;
|
||||
svc_force_system_maintenance=false;
|
||||
|
||||
//
|
||||
// Check for prior instance
|
||||
@ -91,6 +92,10 @@ MainObject::MainObject(QObject *parent)
|
||||
svc_startup_target=target;
|
||||
rda->cmdSwitch()->setProcessed(i,true);
|
||||
}
|
||||
if(rda->cmdSwitch()->key(i)=="--force-system-maintenance") {
|
||||
svc_force_system_maintenance=true;
|
||||
rda->cmdSwitch()->setProcessed(i,true);
|
||||
}
|
||||
if(rda->cmdSwitch()->key(i)=="--initial-maintenance-interval") {
|
||||
initial_maintenance_interval=rda->cmdSwitch()->value(i).toInt(&ok);
|
||||
if(!ok) {
|
||||
@ -158,20 +163,17 @@ void MainObject::processFinishedData(int id)
|
||||
RDProcess *proc=svc_processes.value(id);
|
||||
if(proc->process()->exitStatus()!=QProcess::NormalExit) {
|
||||
rda->syslog(LOG_WARNING,"process \"%s\" crashed!",
|
||||
(proc->program()+" "+proc->arguments().join(" ").trimmed()).
|
||||
toUtf8().constData());
|
||||
proc->prettyCommandString().toUtf8().constData());
|
||||
}
|
||||
else {
|
||||
if(proc->process()->exitCode()!=0) {
|
||||
rda->syslog(LOG_WARNING,"process \"%s\" exited with exit code %d",
|
||||
(proc->program()+" "+proc->arguments().join(" ").trimmed()).
|
||||
toUtf8().constData(),
|
||||
proc->prettyCommandString().toUtf8().constData(),
|
||||
proc->process()->exitCode());
|
||||
}
|
||||
else {
|
||||
rda->syslog(LOG_DEBUG,"process \"%s\" exited normally",
|
||||
(proc->program()+" "+proc->arguments().join(" ").trimmed()).
|
||||
toUtf8().constData());
|
||||
proc->prettyCommandString().toUtf8().constData());
|
||||
}
|
||||
}
|
||||
proc->process()->deleteLater();
|
||||
|
@ -71,6 +71,7 @@ class MainObject : public QObject
|
||||
QTimer *svc_maint_timer;
|
||||
QTimer *svc_exit_timer;
|
||||
StartupTarget svc_startup_target;
|
||||
bool svc_force_system_maintenance;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user