No function changes. Cleanup console command cleanup
This commit is contained in:
parent
3a594acc03
commit
e15331ec35
@ -26,10 +26,12 @@ class ANSIDecode extends Command
|
|||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
echo ANSI::ansi($this->argument('file'));
|
echo ANSI::ansi($this->argument('file'));
|
||||||
|
|
||||||
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -26,9 +26,9 @@ class ANSIEncode extends Command
|
|||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
foreach (ANSI::binary($this->argument('file')) as $line) {
|
foreach (ANSI::binary($this->argument('file')) as $line) {
|
||||||
foreach (str_split(bin2hex($line),2) as $y)
|
foreach (str_split(bin2hex($line),2) as $y)
|
||||||
@ -36,5 +36,7 @@ class ANSIEncode extends Command
|
|||||||
|
|
||||||
echo "\r";
|
echo "\r";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -28,12 +28,10 @@ class AddressIdle extends Command
|
|||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
$do = Domain::where('name',$this->argument('domain'))->singleOrFail();
|
$do = Domain::where('name',$this->argument('domain'))->singleOrFail();
|
||||||
|
|
||||||
Job::dispatchSync($do,$this->option('ftn') ? Address::findFTN($this->option('ftn')) : NULL);
|
return Job::dispatchSync($do,$this->option('ftn') ? Address::findFTN($this->option('ftn')) : NULL);
|
||||||
|
|
||||||
return self::SUCCESS;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -26,10 +26,10 @@ class Rescan extends Command
|
|||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return int
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
if (($this->argument('days')) && (! is_numeric($this->argument('days'))))
|
if (($this->argument('days')) && (! is_numeric($this->argument('days'))))
|
||||||
throw new \Exception('Days must be numeric: '.$this->argument('days'));
|
throw new \Exception('Days must be numeric: '.$this->argument('days'));
|
||||||
|
@ -13,7 +13,7 @@ class AddressCheck extends Command
|
|||||||
|
|
||||||
protected $description = 'Check the addresses we use for a node';
|
protected $description = 'Check the addresses we use for a node';
|
||||||
|
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
$o = Address::findFTN($this->argument('ftn'));
|
$o = Address::findFTN($this->argument('ftn'));
|
||||||
|
|
||||||
@ -29,6 +29,6 @@ class AddressCheck extends Command
|
|||||||
$this->info(sprintf('Our Address: %s',our_address($o)?->ftn));
|
$this->info(sprintf('Our Address: %s',our_address($o)?->ftn));
|
||||||
$this->info(sprintf('- Domain Addresses: %s',our_address($o->zone->domain)->pluck('ftn4d')->join(',')));
|
$this->info(sprintf('- Domain Addresses: %s',our_address($o->zone->domain)->pluck('ftn4d')->join(',')));
|
||||||
|
|
||||||
return Command::SUCCESS;
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -24,7 +24,7 @@ class AddressCheckRole extends Command
|
|||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
foreach (Address::withTrashed()->with(['zone.domain'])->cursor() as $o) {
|
foreach (Address::withTrashed()->with(['zone.domain'])->cursor() as $o) {
|
||||||
// Trim the role bit from role, since we now work out a role automatically.
|
// Trim the role bit from role, since we now work out a role automatically.
|
||||||
@ -44,5 +44,7 @@ class AddressCheckRole extends Command
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Console\Commands;
|
namespace App\Console\Commands\Debug;
|
||||||
|
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Illuminate\Database\QueryException;
|
use Illuminate\Database\QueryException;
|
||||||
@ -15,7 +15,7 @@ class AddressMerge extends Command
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $signature = 'address:merge'
|
protected $signature = 'debug:address:merge'
|
||||||
.' {src : Source Address}'
|
.' {src : Source Address}'
|
||||||
.' {dst : Destination Address}'
|
.' {dst : Destination Address}'
|
||||||
.' {--F|force : Force}'
|
.' {--F|force : Force}'
|
||||||
@ -34,79 +34,84 @@ class AddressMerge extends Command
|
|||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
$src = Address::withTrashed()->findOrfail($this->argument('src'));
|
$src = Address::withTrashed()->findOrfail($this->argument('src'));
|
||||||
$dst = Address::withTrashed()->findOrfail($this->argument('dst'));
|
$dst = Address::withTrashed()->findOrfail($this->argument('dst'));
|
||||||
|
|
||||||
if ((! $this->option('ignore')) && ($src->system_id !== $dst->system_id) && ($src->system->name !== System::default)) {
|
if ((! $this->option('ignore')) && ($src->system_id !== $dst->system_id) && ($src->system->name !== System::default)) {
|
||||||
$this->error(sprintf('FTN addresses are from different systems (%s/%s)',$src->system->name,$dst->system->name));
|
$this->error(sprintf('FTN addresses are from different systems (%s/%s)',$src->system->name,$dst->system->name));
|
||||||
exit(1);
|
|
||||||
|
return self::FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((! $this->option('force')) && ($src->ftn !== $dst->ftn)) {
|
if ((! $this->option('force')) && ($src->ftn !== $dst->ftn)) {
|
||||||
$this->error(sprintf('FTN addresses are not the same (%s:%s)',$src->ftn,$dst->ftn));
|
$this->error(sprintf('FTN addresses are not the same (%s:%s)',$src->ftn,$dst->ftn));
|
||||||
exit(1);
|
|
||||||
|
return self::FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($src->active) {
|
if ($src->active) {
|
||||||
$this->error(sprintf('Source [%s] is still active',$src->ftn));
|
$this->error(sprintf('Source [%s] is still active',$src->ftn));
|
||||||
exit(1);
|
|
||||||
|
return self::FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
DB::beginTransaction();
|
DB::beginTransaction();
|
||||||
|
|
||||||
// Find all echomail seenbys
|
// Find all echomail seenbys
|
||||||
$x = DB::update('update echomail_seenby set address_id=? where address_id=?',[$dst->id,$src->id]);
|
$x = DB::update('UPDATE echomail_seenby SET address_id=? WHERE address_id=?',[$dst->id,$src->id]);
|
||||||
$this->info(sprintf('Updated [%d] echomail seenby records',$x));
|
$this->info(sprintf('Updated [%d] echomail seenby records',$x));
|
||||||
|
|
||||||
// Find all echomail paths
|
// Find all echomail paths
|
||||||
$x = DB::update('update echomail_path set address_id=? where address_id=?',[$dst->id,$src->id]);
|
$x = DB::update('UPDATE echomail_path SET address_id=? WHERE address_id=?',[$dst->id,$src->id]);
|
||||||
$this->info(sprintf('Updated [%d] echomail path records',$x));
|
$this->info(sprintf('Updated [%d] echomail path records',$x));
|
||||||
|
|
||||||
// Find all echomails
|
// Find all echomails
|
||||||
$x = DB::update('update echomails set fftn_id=? where fftn_id=?',[$dst->id,$src->id]);
|
$x = DB::update('UPDATE echomails SET fftn_id=? WHERE fftn_id=?',[$dst->id,$src->id]);
|
||||||
$this->info(sprintf('Updated [%d] echomail source records',$x));
|
$this->info(sprintf('Updated [%d] echomail source records',$x));
|
||||||
|
|
||||||
// Find all netmails
|
// Find all netmails
|
||||||
$x = DB::update('update netmails set fftn_id=? where fftn_id=?',[$dst->id,$src->id]);
|
$x = DB::update('UPDATE netmails SET fftn_id=? WHERE fftn_id=?',[$dst->id,$src->id]);
|
||||||
$this->info(sprintf('Updated [%d] netmail source records',$x));
|
$this->info(sprintf('Updated [%d] netmail source records',$x));
|
||||||
|
|
||||||
// Find all netmails
|
// Find all netmails
|
||||||
$x = DB::update('update netmails set tftn_id=? where tftn_id=?',[$dst->id,$src->id]);
|
$x = DB::update('UPDATE netmails SET tftn_id=? WHERE tftn_id=?',[$dst->id,$src->id]);
|
||||||
$this->info(sprintf('Updated [%d] netmail destination records',$x));
|
$this->info(sprintf('Updated [%d] netmail destination records',$x));
|
||||||
|
|
||||||
// Find all nodelist
|
// Find all nodelist
|
||||||
$x = DB::update('update address_nodelist set address_id=? where address_id=?',[$dst->id,$src->id]);
|
$x = DB::update('UPDATE address_nodelist SET address_id=? WHERE address_id=?',[$dst->id,$src->id]);
|
||||||
$this->info(sprintf('Updated [%d] nodelist records',$x));
|
$this->info(sprintf('Updated [%d] nodelist records',$x));
|
||||||
|
|
||||||
// Find all file seenbys
|
// Find all file seenbys
|
||||||
$x = DB::update('update file_seenby set address_id=? where address_id=?',[$dst->id,$src->id]);
|
$x = DB::update('UPDATE file_seenby SET address_id=? WHERE address_id=?',[$dst->id,$src->id]);
|
||||||
$this->info(sprintf('Updated [%d] file seenby records',$x));
|
$this->info(sprintf('Updated [%d] file seenby records',$x));
|
||||||
|
|
||||||
// Find all files
|
// Find all files
|
||||||
$x = DB::update('update files set fftn_id=? where fftn_id=?',[$dst->id,$src->id]);
|
$x = DB::update('UPDATE files SET fftn_id=? WHERE fftn_id=?',[$dst->id,$src->id]);
|
||||||
$this->info(sprintf('Updated [%d] file source records',$x));
|
$this->info(sprintf('Updated [%d] file source records',$x));
|
||||||
|
|
||||||
// Resubscribe echoareas
|
// Resubscribe echoareas
|
||||||
try {
|
try {
|
||||||
$x = DB::update('update address_echoarea set address_id=? where address_id=?',[$dst->id,$src->id]);
|
$x = DB::update('UPDATE address_echoarea SET address_id=? WHERE address_id=?',[$dst->id,$src->id]);
|
||||||
|
|
||||||
} catch (QueryException $e) {
|
} catch (QueryException $e) {
|
||||||
DB::rollback();
|
DB::rollback();
|
||||||
$this->error(sprintf('You may need to remove %s:%s (%d) from echoareas',$src->ftn,$src->system->name,$src->id));
|
$this->error(sprintf('You may need to remove %s:%s (%d) from echoareas',$src->ftn,$src->system->name,$src->id));
|
||||||
exit(1);
|
|
||||||
|
return self::FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->info(sprintf('Updated [%d] echomail subscription records',$x));
|
$this->info(sprintf('Updated [%d] echomail subscription records',$x));
|
||||||
|
|
||||||
// Resubscribe fileareas
|
// Resubscribe fileareas
|
||||||
try {
|
try {
|
||||||
$x = DB::update('update address_filearea set address_id=? where address_id=?',[$dst->id,$src->id]);
|
$x = DB::update('UPDATE address_filearea SET address_id=? WHERE address_id=?',[$dst->id,$src->id]);
|
||||||
} catch (QueryException $e) {
|
} catch (QueryException $e) {
|
||||||
DB::rollback();
|
DB::rollback();
|
||||||
$this->error(sprintf('You may need to remove %s:%s (%d) from fileareas',$src->ftn,$src->system->name,$src->id));
|
$this->error(sprintf('You may need to remove %s:%s (%d) from fileareas',$src->ftn,$src->system->name,$src->id));
|
||||||
exit(1);
|
|
||||||
|
return self::FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->info(sprintf('Updated [%d] filearea subscription records',$x));
|
$this->info(sprintf('Updated [%d] filearea subscription records',$x));
|
||||||
@ -117,7 +122,7 @@ class AddressMerge extends Command
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
if ($src->forceDelete()) {
|
if ($src->forceDelete()) {
|
||||||
$this->alert(sprintf('%s deleted.', $src->ftn));
|
$this->alert(sprintf('%s deleted.',$src->ftn));
|
||||||
DB::commit();
|
DB::commit();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -126,6 +131,6 @@ class AddressMerge extends Command
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Command::SUCCESS;
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Console\Commands;
|
namespace App\Console\Commands\Debug;
|
||||||
|
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ class EchomailDump extends Command
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $signature = 'echomail:dump {id}';
|
protected $signature = 'debug:echomail:dump {id}';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The console command description.
|
* The console command description.
|
||||||
@ -26,10 +26,12 @@ class EchomailDump extends Command
|
|||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
dump(Echomail::findOrFail($this->argument('id')));
|
dump(Echomail::findOrFail($this->argument('id')));
|
||||||
|
|
||||||
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Console\Commands;
|
namespace App\Console\Commands\Debug;
|
||||||
|
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Illuminate\Support\Facades\Notification;
|
use Illuminate\Support\Facades\Notification;
|
||||||
@ -15,7 +15,7 @@ class NetmailTest extends Command
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $signature = 'netmail:test'
|
protected $signature = 'debug:netmail:test'
|
||||||
.' {ftn : FTN to send netmail to}';
|
.' {ftn : FTN to send netmail to}';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -28,13 +28,15 @@ class NetmailTest extends Command
|
|||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return int
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle():int
|
||||||
{
|
{
|
||||||
$ao = Address::findFTN($this->argument('ftn'));
|
$ao = Address::findFTN($this->argument('ftn'));
|
||||||
|
|
||||||
Notification::route('netmail',$ao)->notify(new NetmailTestNotification());
|
Notification::route('netmail',$ao)->notify(new NetmailTestNotification());
|
||||||
|
|
||||||
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -29,10 +29,10 @@ class PacketAddress extends Command
|
|||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return int
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
$ao = Address::findFTN($this->argument('ftn'));
|
$ao = Address::findFTN($this->argument('ftn'));
|
||||||
|
|
||||||
@ -57,6 +57,6 @@ class PacketAddress extends Command
|
|||||||
->generate()
|
->generate()
|
||||||
);
|
);
|
||||||
|
|
||||||
return Command::SUCCESS;
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Console\Commands;
|
namespace App\Console\Commands\Debug;
|
||||||
|
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Illuminate\Support\Facades\Mail;
|
use Illuminate\Support\Facades\Mail;
|
||||||
@ -15,7 +15,7 @@ class SendTestEmail extends Command
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $signature = 'email:test {id}';
|
protected $signature = 'debug:email:test {id}';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The console command description.
|
* The console command description.
|
||||||
@ -27,13 +27,15 @@ class SendTestEmail extends Command
|
|||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
$uo = User::find($this->argument('id'));
|
$uo = User::find($this->argument('id'));
|
||||||
|
|
||||||
Mail::to($uo->email)
|
Mail::to($uo->email)
|
||||||
->send(new MailTest($uo));
|
->send(new MailTest($uo));
|
||||||
|
|
||||||
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -14,7 +14,7 @@ class ZoneCheck extends Command
|
|||||||
|
|
||||||
protected $description = 'Check that the addresses in a zone are configured correctly';
|
protected $description = 'Check that the addresses in a zone are configured correctly';
|
||||||
|
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
$do = Domain::where('name',$this->argument('domain'))->singleOrFail();
|
$do = Domain::where('name',$this->argument('domain'))->singleOrFail();
|
||||||
|
|
||||||
@ -42,6 +42,6 @@ class ZoneCheck extends Command
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
return Command::SUCCESS;
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -30,9 +30,9 @@ class EchoareaImport extends Command
|
|||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
$do = Domain::where('name',strtolower($this->argument('domain')))->singleOrFail();
|
$do = Domain::where('name',strtolower($this->argument('domain')))->singleOrFail();
|
||||||
return Job::dispatchSync($this->argument('file'),$do,$this->option('prefix'),$this->option('unlink'));
|
return Job::dispatchSync($this->argument('file'),$do,$this->option('prefix'),$this->option('unlink'));
|
||||||
|
@ -30,9 +30,9 @@ class FileareaImport extends Command
|
|||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
$do = Domain::where('name',strtolower($this->argument('domain')))->singleOrFail();
|
$do = Domain::where('name',strtolower($this->argument('domain')))->singleOrFail();
|
||||||
return Job::dispatchSync($this->argument('file'),$do,$this->option('prefix'),$this->option('unlink'));
|
return Job::dispatchSync($this->argument('file'),$do,$this->option('prefix'),$this->option('unlink'));
|
||||||
|
@ -26,10 +26,10 @@ class Rescan extends Command
|
|||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return int
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
$ao = Address::findFtn($this->argument('ftn'));
|
$ao = Address::findFtn($this->argument('ftn'));
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ class FilesList extends Command
|
|||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
$this->table([
|
$this->table([
|
||||||
'files.id' => 'ID',
|
'files.id' => 'ID',
|
||||||
@ -37,6 +37,6 @@ class FilesList extends Command
|
|||||||
->join('fileareas',['fileareas.id'=>'files.filearea_id'])
|
->join('fileareas',['fileareas.id'=>'files.filearea_id'])
|
||||||
->cursor());
|
->cursor());
|
||||||
|
|
||||||
return Command::SUCCESS;
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -25,7 +25,7 @@ class JobList extends Command
|
|||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
$lastq = NULL;
|
$lastq = NULL;
|
||||||
|
|
||||||
@ -45,5 +45,7 @@ class JobList extends Command
|
|||||||
$o->attempts ? sprintf(' (Created:%s)',$o->created_at) : ''
|
$o->attempts ? sprintf(' (Created:%s)',$o->created_at) : ''
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -28,7 +28,7 @@ class MailList extends Command
|
|||||||
* @return int
|
* @return int
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
$ao = Address::findFTN($this->argument('ftn'),TRUE);
|
$ao = Address::findFTN($this->argument('ftn'),TRUE);
|
||||||
|
|
||||||
|
@ -32,9 +32,9 @@ class NodelistImport extends Command
|
|||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle():int
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return Job::dispatchSync(
|
return Job::dispatchSync(
|
||||||
@ -50,6 +50,8 @@ class NodelistImport extends Command
|
|||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->error($e->getMessage());
|
$this->error($e->getMessage());
|
||||||
|
|
||||||
|
return self::FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -30,10 +30,10 @@ class PacketInfo extends Command
|
|||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return int
|
||||||
* @throws \App\Exceptions\InvalidPacketException
|
* @throws \App\Exceptions\InvalidPacketException
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle():int
|
||||||
{
|
{
|
||||||
$fs = Storage::disk(config('fido.local_disk'));
|
$fs = Storage::disk(config('fido.local_disk'));
|
||||||
$rel_name = sprintf('%s/%s',config('fido.dir'),$this->argument('file'));
|
$rel_name = sprintf('%s/%s',config('fido.dir'),$this->argument('file'));
|
||||||
@ -109,5 +109,7 @@ class PacketInfo extends Command
|
|||||||
|
|
||||||
$this->line("\n");
|
$this->line("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,10 +58,10 @@ class PacketProcess extends Command
|
|||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*
|
*
|
||||||
* @return int|void
|
* @return int
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
$rel_name = sprintf('%s/%s',config('fido.dir'),$this->argument('file'));
|
$rel_name = sprintf('%s/%s',config('fido.dir'),$this->argument('file'));
|
||||||
|
|
||||||
@ -74,7 +74,8 @@ class PacketProcess extends Command
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
$this->error('Unable to determine sender FTN address');
|
$this->error('Unable to determine sender FTN address');
|
||||||
exit(1);
|
|
||||||
|
return self::FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Job::dispatchSync($rel_name,$ao->zone->domain,$this->option('dontqueue'));
|
Job::dispatchSync($rel_name,$ao->zone->domain,$this->option('dontqueue'));
|
||||||
|
@ -29,7 +29,7 @@ class PacketSystem extends Command
|
|||||||
* @return int
|
* @return int
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
$ao = Address::findFTN($this->argument('ftn'));
|
$ao = Address::findFTN($this->argument('ftn'));
|
||||||
|
|
||||||
|
@ -30,10 +30,10 @@ class ServerStart extends Command
|
|||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return int
|
||||||
* @throws SocketException
|
* @throws SocketException
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
Log::info(sprintf('%s:+ Server Starting (%d)',self::LOGKEY,getmypid()));
|
Log::info(sprintf('%s:+ Server Starting (%d)',self::LOGKEY,getmypid()));
|
||||||
$o = Setup::findOrFail(config('app.id'));
|
$o = Setup::findOrFail(config('app.id'));
|
||||||
@ -71,7 +71,7 @@ class ServerStart extends Command
|
|||||||
if (! $start->count()) {
|
if (! $start->count()) {
|
||||||
Log::alert(sprintf('%s:! No servers configured to start',self::LOGKEY));
|
Log::alert(sprintf('%s:! No servers configured to start',self::LOGKEY));
|
||||||
|
|
||||||
return;
|
return self::FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
pcntl_signal(SIGCHLD,SIG_IGN);
|
pcntl_signal(SIGCHLD,SIG_IGN);
|
||||||
@ -105,7 +105,7 @@ class ServerStart extends Command
|
|||||||
Log::info(sprintf('%s:= Finished: [%s]',self::LOGKEY,$item));
|
Log::info(sprintf('%s:= Finished: [%s]',self::LOGKEY,$item));
|
||||||
|
|
||||||
// Child finished we need to get out of this loop.
|
// Child finished we need to get out of this loop.
|
||||||
exit;
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::debug(sprintf('%s:- Forked for [%s] (%d)',self::LOGKEY,$item,$pid));
|
Log::debug(sprintf('%s:- Forked for [%s] (%d)',self::LOGKEY,$item,$pid));
|
||||||
@ -125,5 +125,7 @@ class ServerStart extends Command
|
|||||||
|
|
||||||
// Done
|
// Done
|
||||||
Log::debug(sprintf('%s:= Finished.',self::LOGKEY));
|
Log::debug(sprintf('%s:= Finished.',self::LOGKEY));
|
||||||
|
|
||||||
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -27,9 +27,9 @@ class SystemHeartbeat extends Command
|
|||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
Log::info('CSH:- Triggering heartbeat to systems');
|
Log::info('CSH:- Triggering heartbeat to systems');
|
||||||
Job::dispatchSync($this->option('force'));
|
return Job::dispatchSync($this->option('force'));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -29,11 +29,9 @@ class TicProcess extends Command
|
|||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
// Dispatch job.
|
// Dispatch job.
|
||||||
Job::dispatchSync($this->argument('file'),$this->argument('domain'));
|
return Job::dispatchSync($this->argument('file'),$this->argument('domain'));
|
||||||
|
|
||||||
return Command::SUCCESS;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -19,14 +19,16 @@ class UserCodeSend extends Command
|
|||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return int
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
$ao = Address::findFTN($this->argument('ftn'));
|
$ao = Address::findFTN($this->argument('ftn'));
|
||||||
$uo = User::where('email',$this->argument('email'))->singleOrFail();
|
$uo = User::where('email',$this->argument('email'))->singleOrFail();
|
||||||
|
|
||||||
Notification::route('netmail',$ao->uplink())->notify(new AddressLink($uo));
|
Notification::route('netmail',$ao->uplink())->notify(new AddressLink($uo));
|
||||||
|
|
||||||
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -27,12 +27,14 @@ class UserMakeAdmin extends Command
|
|||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
$o = User::where('email',$this->argument('email'))->firstOrfail();
|
$o = User::where('email',$this->argument('email'))->firstOrfail();
|
||||||
$o->admin = ! $o->admin;
|
$o->admin = ! $o->admin;
|
||||||
$o->save();
|
$o->save();
|
||||||
|
|
||||||
$this->info(sprintf('User [%s] %s an admin',$o->email,$o->admin ? 'IS' : 'is NOT'));
|
$this->info(sprintf('User [%s] %s an admin',$o->email,$o->admin ? 'IS' : 'is NOT'));
|
||||||
|
|
||||||
|
return self::SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,28 +15,44 @@ return [
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
'hide' => [
|
'hide' => [
|
||||||
|
'about',
|
||||||
|
'auth:*',
|
||||||
'cache:*',
|
'cache:*',
|
||||||
|
'channel:*',
|
||||||
|
'clear-compiled',
|
||||||
'completion',
|
'completion',
|
||||||
'config:*',
|
'config:*',
|
||||||
'db:*',
|
'db:*',
|
||||||
|
'docs',
|
||||||
'debugbar:*',
|
'debugbar:*',
|
||||||
'event:*',
|
'event:*',
|
||||||
|
'env:*',
|
||||||
'ide-helper:*',
|
'ide-helper:*',
|
||||||
|
'install:*',
|
||||||
'inspire',
|
'inspire',
|
||||||
'key:generate',
|
'key:generate',
|
||||||
|
'lang:*',
|
||||||
'list',
|
'list',
|
||||||
'make:*',
|
'make:*',
|
||||||
'migrate:*',
|
'migrate:*',
|
||||||
|
'model:*',
|
||||||
'model:prune',
|
'model:prune',
|
||||||
'notifications:table',
|
'notifications:table',
|
||||||
'optimize:*',
|
'optimize:*',
|
||||||
'package:discover',
|
'package:discover',
|
||||||
|
'queue:listen',
|
||||||
|
'queue:prune-batches',
|
||||||
|
'queue:prune-failed',
|
||||||
|
'queue:retry',
|
||||||
|
'queue:retry-batch',
|
||||||
|
'queue:work',
|
||||||
'route:*',
|
'route:*',
|
||||||
|
'sanctum:*',
|
||||||
'serve',
|
'serve',
|
||||||
'schedule:*',
|
'schedule:*',
|
||||||
'schema:dump',
|
'schema:dump',
|
||||||
'session:table',
|
'session:table',
|
||||||
'storage:link',
|
'storage:*',
|
||||||
'stub:publish',
|
'stub:publish',
|
||||||
'test',
|
'test',
|
||||||
'theme:*',
|
'theme:*',
|
||||||
|
Loading…
Reference in New Issue
Block a user