File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed
Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ class AppSettingsCommand extends Command
4444 {--redis-host= : Redis host to use for connections.}
4545 {--redis-pass= : Password used to connect to redis.}
4646 {--redis-port= : Port to connect to redis over.}
47- {--settings-ui= : Enable or disable the settings UI.} ' ;
47+ {--settings-ui= : Enable or disable the settings UI.}
48+ {--telemetry= : Enable or disable anonymous telemetry.} ' ;
4849
4950 protected array $ variables = [];
5051
@@ -119,6 +120,12 @@ public function handle(): int
119120 $ this ->variables ['APP_ENVIRONMENT_ONLY ' ] = $ this ->confirm ('Enable UI based settings editor? ' , true ) ? 'false ' : 'true ' ;
120121 }
121122
123+ $ this ->output ->comment ('Please reference https://pterodactyl.io/panel/1.0/additional_configuration.html#telemetry for more detailed information regarding telemetry data and collection. ' );
124+ $ this ->variables ['PTERODACTYL_TELEMETRY_ENABLED ' ] = $ this ->option ('telemetry ' ) ?? $ this ->confirm (
125+ 'Enable sending anonymous telemetry data? ' ,
126+ config ('pterodactyl.telemetry.enabled ' , true )
127+ ) ? 'true ' : 'false ' ;
128+
122129 // Make sure session cookies are set as "secure" when using HTTPS
123130 if (str_starts_with ($ this ->variables ['APP_URL ' ], 'https:// ' )) {
124131 $ this ->variables ['SESSION_SECURE_COOKIE ' ] = 'true ' ;
Original file line number Diff line number Diff line change @@ -56,10 +56,10 @@ private function registerTelemetry(Schedule $schedule): void
5656 {
5757 $ settingsRepository = app ()->make (SettingsRepository::class);
5858
59- $ uuid = $ settingsRepository ->get ('app:uuid ' );
59+ $ uuid = $ settingsRepository ->get ('app:telemetry: uuid ' );
6060 if (is_null ($ uuid )) {
6161 $ uuid = Uuid::uuid4 ()->toString ();
62- $ settingsRepository ->set ('app:uuid ' , $ uuid );
62+ $ settingsRepository ->set ('app:telemetry: uuid ' , $ uuid );
6363 }
6464
6565 // Calculate a fixed time to run the data push at, this will be the same time every day.
Original file line number Diff line number Diff line change @@ -52,10 +52,10 @@ public function __invoke(): void
5252 */
5353 public function collect (): array
5454 {
55- $ uuid = $ this ->settingsRepository ->get ('app:uuid ' );
55+ $ uuid = $ this ->settingsRepository ->get ('app:telemetry: uuid ' );
5656 if (is_null ($ uuid )) {
5757 $ uuid = Uuid::uuid4 ()->toString ();
58- $ this ->settingsRepository ->set ('app:uuid ' , $ uuid );
58+ $ this ->settingsRepository ->set ('app:telemetry: uuid ' , $ uuid );
5959 }
6060
6161 $ nodes = Node::all ()->map (function ($ node ) {
You can’t perform that action at this time.
0 commit comments