Add skip scripting option
This commit is contained in:
parent
c8f1335a09
commit
3fe5d162f5
3 changed files with 10 additions and 2 deletions
|
@ -41,8 +41,7 @@ class OptionController extends Controller
|
|||
|
||||
return response()->json([
|
||||
'scripts' => [
|
||||
'install' => str_replace(["\r\n", "\n", "\r"], "\n", $server->option->script_install),
|
||||
// 'upgrade' => str_replace(["\r\n", "\n", "\r"], "\n", $server->option->script_upgrade),
|
||||
'install' => (! $server->option->script_install) ? null : str_replace(["\r\n", "\n", "\r"], "\n", $server->option->script_install),
|
||||
'privileged' => $server->option->script_is_privileged,
|
||||
],
|
||||
'env' => $environment->merge([
|
||||
|
|
|
@ -103,6 +103,7 @@ class ServerRepository
|
|||
'startup' => 'string',
|
||||
'auto_deploy' => 'sometimes|required|accepted',
|
||||
'custom_id' => 'sometimes|required|numeric|unique:servers,id',
|
||||
'skip_scripting' => 'sometimes|required|boolean',
|
||||
]);
|
||||
|
||||
$validator->sometimes('node_id', 'required|numeric|min:1|exists:nodes,id', function ($input) {
|
||||
|
@ -326,6 +327,7 @@ class ServerRepository
|
|||
'type' => $service->folder,
|
||||
'option' => $option->tag,
|
||||
'pack' => (isset($pack)) ? $pack->uuid : null,
|
||||
'skip_scripting' => isset($data['skip_scripting']),
|
||||
],
|
||||
'keys' => [
|
||||
(string) $server->daemonSecret => $this->daemonPermissions,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue