mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-26 07:10:11 +01:00
2018-08-10 Fred Gleason <fredg@paravelsystems.com>
* Changed installation location of caed(8), ripcd(8), rdcatchd(8) and rdrepld(8) from '@prefix@/bin' to '@prefix@/sbin'. * Removed code to detach from controlling terminal after startup from caed(8), ripcd(8), rdcatchd(8) and rdrepld(8). * Removed code to manage dropbox instances from rdcatchd(8). * Removed code to start service daemons automatically from user modules. * Added rdservice(8).
This commit is contained in:
27
cae/cae.cpp
27
cae/cae.cpp
@@ -41,7 +41,6 @@
|
||||
|
||||
#include <rdsocket.h>
|
||||
#include <rdconf.h>
|
||||
#include <rdcheck_daemons.h>
|
||||
#include <rddb.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rddebug.h>
|
||||
@@ -107,15 +106,6 @@ MainObject::MainObject(QObject *parent,const char *name)
|
||||
rd_config->load();
|
||||
rd_config->setModuleName("caed");
|
||||
|
||||
//
|
||||
// Make sure we're the only instance running
|
||||
//
|
||||
if(CheckDaemon(RD_CAED_PID)) {
|
||||
rd_config->log("caed",RDConfig::LogErr,
|
||||
"ERROR caed aborting - multiple instances not allowed");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
//
|
||||
// Initialize Data Structures
|
||||
//
|
||||
@@ -179,20 +169,10 @@ MainObject::MainObject(QObject *parent,const char *name)
|
||||
}
|
||||
connect(server,SIGNAL(connection(int)),this,SLOT(newConnection(int)));
|
||||
|
||||
if(!debug) {
|
||||
RDDetach(rd_config->logCoreDumpDirectory());
|
||||
}
|
||||
|
||||
signal(SIGHUP,SigHandler);
|
||||
signal(SIGINT,SigHandler);
|
||||
signal(SIGTERM,SigHandler);
|
||||
|
||||
if(!RDWritePid(RD_PID_DIR,"caed.pid",rd_config->uid())) {
|
||||
rd_config->log("caed",RDConfig::LogErr,"can't write pid file");
|
||||
fprintf(stderr,"caed: can't write pid file\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
//
|
||||
// Allowcate Meter Socket
|
||||
//
|
||||
@@ -238,11 +218,7 @@ MainObject::MainObject(QObject *parent,const char *name)
|
||||
// Close Database Connection
|
||||
//
|
||||
cae_station->setScanned(true);
|
||||
/*
|
||||
delete cae_station;
|
||||
cae_station=NULL;
|
||||
db->removeDatabase(rd_config->mysqlDbname());
|
||||
*/
|
||||
|
||||
//
|
||||
// Initialize Mixers
|
||||
//
|
||||
@@ -455,7 +431,6 @@ void MainObject::updateMeters()
|
||||
jackFree();
|
||||
alsaFree();
|
||||
hpiFree();
|
||||
RDDeletePid(RD_PID_DIR,"caed.pid");
|
||||
rd_config->log("caed",RDConfig::LogInfo,"cae exiting");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user