diff --git a/app/Console/Commands/Environment/AppSettingsCommand.php b/app/Console/Commands/Environment/AppSettingsCommand.php index a1d272837..4f2e93119 100644 --- a/app/Console/Commands/Environment/AppSettingsCommand.php +++ b/app/Console/Commands/Environment/AppSettingsCommand.php @@ -118,7 +118,7 @@ class AppSettingsCommand extends Command } if ($this->variables['QUEUE_CONNECTION'] !== 'sync') { - Artisan::call('p:environment:queue-service', [ + $this->call('p:environment:queue-service', [ '--use-redis' => $redisUsed, ]); } diff --git a/app/Console/Commands/Environment/DatabaseSettingsCommand.php b/app/Console/Commands/Environment/DatabaseSettingsCommand.php index e9369a965..b06671f54 100644 --- a/app/Console/Commands/Environment/DatabaseSettingsCommand.php +++ b/app/Console/Commands/Environment/DatabaseSettingsCommand.php @@ -98,7 +98,7 @@ class DatabaseSettingsCommand extends Command } elseif ($this->variables['DB_CONNECTION'] === 'sqlite') { $this->variables['DB_DATABASE'] = $this->option('database') ?? $this->ask( 'Database Path', - config('database.connections.sqlite.database', database_path('database.sqlite')) + config('database.connections.sqlite.database', 'database.sqlite') ); } diff --git a/app/Console/Commands/Environment/QueueWorkerServiceCommand.php b/app/Console/Commands/Environment/QueueWorkerServiceCommand.php index 49d4cbfec..93fe6223f 100644 --- a/app/Console/Commands/Environment/QueueWorkerServiceCommand.php +++ b/app/Console/Commands/Environment/QueueWorkerServiceCommand.php @@ -19,17 +19,18 @@ class QueueWorkerServiceCommand extends Command public function handle(): void { - $serviceName = $this->option('service-name') ?? $this->ask('Service name', 'pelican-queue'); + $serviceName = $this->option('service-name') ?? $this->ask('Queue worker service name', 'pelican-queue'); $path = '/etc/systemd/system/' . $serviceName . '.service'; - if (file_exists($path) && !$this->option('overwrite') && !$this->confirm('The service file already exists. Do you want to overwrite it?')) { - $this->line('Creation of queue worker service file aborted.'); + $fileExists = file_exists($path); + if ($fileExists && !$this->option('overwrite') && !$this->confirm('The service file already exists. Do you want to overwrite it?')) { + $this->line('Creation of queue worker service file aborted because serive file already exists.'); return; } - $user = $this->option('user') ?? $this->ask('User', 'www-data'); - $group = $this->option('group') ?? $this->ask('Group', 'www-data'); + $user = $this->option('user') ?? $this->ask('Webserver User', 'www-data'); + $group = $this->option('group') ?? $this->ask('Webserver Group', 'www-data'); $afterRedis = $this->option('use-redis') ? '\nAfter=redis-server.service' : ''; @@ -45,7 +46,7 @@ Description=Pelican Queue Service$afterRedis User=$user Group=$group Restart=always -ExecStart=/usr/bin/php $basePath/artisan queue:work --queue=high,standard,low --tries=3 +ExecStart=/usr/bin/php $basePath/artisan queue:work --tries=3 StartLimitInterval=180 StartLimitBurst=30 RestartSec=5s @@ -60,13 +61,24 @@ WantedBy=multi-user.target return; } - $result = Process::run("systemctl enable --now $serviceName.service"); - if ($result->failed()) { - $this->error('Error enabling service: ' . $result->errorOutput()); + if ($fileExists) { + $result = Process::run("systemctl restart $serviceName.service"); + if ($result->failed()) { + $this->error('Error restarting service: ' . $result->errorOutput()); - return; + return; + } + + $this->line('Queue worker service file updated successfully.'); + } else { + $result = Process::run("systemctl enable --now $serviceName.service"); + if ($result->failed()) { + $this->error('Error enabling service: ' . $result->errorOutput()); + + return; + } + + $this->line('Queue worker service file created successfully.'); } - - $this->line('Queue worker service file created successfully.'); } } diff --git a/app/Console/Commands/User/MakeUserCommand.php b/app/Console/Commands/User/MakeUserCommand.php index 53082e324..20de2ec20 100644 --- a/app/Console/Commands/User/MakeUserCommand.php +++ b/app/Console/Commands/User/MakeUserCommand.php @@ -30,7 +30,7 @@ class MakeUserCommand extends Command public function handle(): int { try { - DB::select('select 1 where 1'); + DB::connection()->getPdo(); } catch (Exception $exception) { $this->error($exception->getMessage()); diff --git a/app/Filament/Resources/ServerResource/Pages/EditServer.php b/app/Filament/Resources/ServerResource/Pages/EditServer.php index 932610d59..ec93fa9c6 100644 --- a/app/Filament/Resources/ServerResource/Pages/EditServer.php +++ b/app/Filament/Resources/ServerResource/Pages/EditServer.php @@ -532,7 +532,6 @@ class EditServer extends EditRecord $text = Forms\Components\TextInput::make('variable_value') ->hidden($this->shouldHideComponent(...)) - ->maxLength(191) ->rules([ fn (ServerVariable $serverVariable): Closure => function (string $attribute, $value, Closure $fail) use ($serverVariable) { $validator = Validator::make(['validatorkey' => $value], [ diff --git a/resources/scripts/components/server/backups/CreateBackupButton.tsx b/resources/scripts/components/server/backups/CreateBackupButton.tsx index d0cb98fd5..9dded0f79 100644 --- a/resources/scripts/components/server/backups/CreateBackupButton.tsx +++ b/resources/scripts/components/server/backups/CreateBackupButton.tsx @@ -40,7 +40,7 @@ const ModalContent = ({ ...props }: RequiredModalProps) => { label={'Ignored Files & Directories'} description={` Enter the files or folders to ignore while generating this backup. Leave blank to use - the contents of the .panelignore file in the root of the server directory if present. + the contents of the .pelicanignore file in the root of the server directory if present. Wildcard matching of files and folders is supported in addition to negating a rule by prefixing the path with an exclamation point. `} diff --git a/resources/scripts/components/server/files/FileEditContainer.tsx b/resources/scripts/components/server/files/FileEditContainer.tsx index b0c7546a1..83a3dde66 100644 --- a/resources/scripts/components/server/files/FileEditContainer.tsx +++ b/resources/scripts/components/server/files/FileEditContainer.tsx @@ -91,13 +91,14 @@ export default () => { - {hash.replace(/^#/, '').endsWith('.panelignore') && ( + {hash.replace(/^#/, '').endsWith('.pelicanignore') && (

- You're editing a .panelignore{' '} - file. Any files or directories listed in here will be excluded from backups. Wildcards are - supported by using an asterisk (*). - You can negate a prior rule by prepending an exclamation point ( + You're editing a{' '} + .pelicanignore directories listed + in here will be excluded from backups. Wildcards are supported by using an supported by using an + asterisk (*). You can negate a + prior rule by prepending an exclamation point ( !).

diff --git a/resources/scripts/components/server/schedules/TaskDetailsModal.tsx b/resources/scripts/components/server/schedules/TaskDetailsModal.tsx index 578c207c0..6dcd9e932 100644 --- a/resources/scripts/components/server/schedules/TaskDetailsModal.tsx +++ b/resources/scripts/components/server/schedules/TaskDetailsModal.tsx @@ -168,7 +168,7 @@ const TaskDetailsModal = ({ schedule, task }: Props) => {