mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-23 09:56:34 +02:00
Rename manager to launcher, add option for no background daemon
This commit is contained in:
parent
929ea695e1
commit
c790b47c14
6 changed files with 64 additions and 51 deletions
|
@ -27,16 +27,15 @@ class Phone extends AbstractDaemon
|
|||
$this->msg_queue_id = (int) mb_substr($this->phone['number'], 1);
|
||||
|
||||
$name = 'RaspiSMS Daemon Phone ' . $this->phone['number'];
|
||||
|
||||
$logger = new Logger($name);
|
||||
$logger->pushHandler(new StreamHandler(PWD_LOGS . '/raspisms.log', Logger::DEBUG));
|
||||
|
||||
$pid_dir = PWD_PID;
|
||||
$no_parent = false; //Phone should be rattach to manager, so manager can stop him easily
|
||||
$additional_signals = [];
|
||||
$uniq = true; //Main server should be uniq
|
||||
$uniq = true; //Each phone should be uniq
|
||||
|
||||
//Construct the server and add SIGUSR1 and SIGUSR2
|
||||
parent::__construct($name, $logger, $pid_dir, $additional_signals, $uniq);
|
||||
//Construct the daemon
|
||||
parent::__construct($name, $logger, $pid_dir, $no_parent, $additional_signals, $uniq);
|
||||
|
||||
parent::start();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue