Merge pull request #65 from AreYouRlyScared/patch-3
Update diagnostics.go
This commit is contained in:
		
						commit
						e8dbba5cc0
					
				| 
						 | 
				
			
			@ -89,15 +89,15 @@ func diagnosticsCmdRun(cmd *cobra.Command, args []string) {
 | 
			
		|||
	output := &strings.Builder{}
 | 
			
		||||
	fmt.Fprintln(output, "Pterodactyl Wings - Diagnostics Report")
 | 
			
		||||
	printHeader(output, "Versions")
 | 
			
		||||
	fmt.Fprintln(output, "wings:", system.Version)
 | 
			
		||||
	fmt.Fprintln(output, "         wings:", system.Version)
 | 
			
		||||
	if dockerErr == nil {
 | 
			
		||||
		fmt.Fprintln(output, "Docker", dockerVersion.Version)
 | 
			
		||||
		fmt.Fprintln(output, "Docker:", dockerVersion.Version)
 | 
			
		||||
	}
 | 
			
		||||
	if v, err := kernel.GetKernelVersion(); err == nil {
 | 
			
		||||
		fmt.Fprintln(output, "Kernel:", v)
 | 
			
		||||
	}
 | 
			
		||||
	if os, err := operatingsystem.GetOperatingSystem(); err == nil {
 | 
			
		||||
		fmt.Fprintln(output, "OS:", os)
 | 
			
		||||
		fmt.Fprintln(output, "    OS:", os)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	printHeader(output, "Wings Configuration")
 | 
			
		||||
| 
						 | 
				
			
			@ -105,23 +105,23 @@ func diagnosticsCmdRun(cmd *cobra.Command, args []string) {
 | 
			
		|||
	if cfg != nil {
 | 
			
		||||
		fmt.Fprintln(output, "    Panel Location:", redact(cfg.PanelLocation))
 | 
			
		||||
		fmt.Fprintln(output, "")
 | 
			
		||||
		fmt.Fprintln(output, "Internal Webserver:", redact(cfg.Api.Host) + ":", cfg.Api.Port)
 | 
			
		||||
		fmt.Fprintln(output, "       SSL Enabled:", cfg.Api.Ssl.Enabled)
 | 
			
		||||
		fmt.Fprintln(output, "   SSL Certificate:", redact(cfg.Api.Ssl.CertificateFile))
 | 
			
		||||
		fmt.Fprintln(output, "           SSL Key:", redact(cfg.Api.Ssl.KeyFile))
 | 
			
		||||
		fmt.Fprintln(output, " Internal Webserver:", redact(cfg.Api.Host), ":", cfg.Api.Port)
 | 
			
		||||
		fmt.Fprintln(output, "        SSL Enabled:", cfg.Api.Ssl.Enabled)
 | 
			
		||||
		fmt.Fprintln(output, "    SSL Certificate:", redact(cfg.Api.Ssl.CertificateFile))
 | 
			
		||||
		fmt.Fprintln(output, "            SSL Key:", redact(cfg.Api.Ssl.KeyFile))
 | 
			
		||||
		fmt.Fprintln(output, "")
 | 
			
		||||
		fmt.Fprintln(output, "       SFTP Server:", redact(cfg.System.Sftp.Address), ":", cfg.System.Sftp.Port)
 | 
			
		||||
		fmt.Fprintln(output, "    SFTP Read-Only:", cfg.System.Sftp.ReadOnly)
 | 
			
		||||
		fmt.Fprintln(output, "        SFTP Server:", redact(cfg.System.Sftp.Address), ":", cfg.System.Sftp.Port)
 | 
			
		||||
		fmt.Fprintln(output, "     SFTP Read-Only:", cfg.System.Sftp.ReadOnly)
 | 
			
		||||
		fmt.Fprintln(output, "")
 | 
			
		||||
		fmt.Fprintln(output, "    Root Directory:", cfg.System.RootDirectory)
 | 
			
		||||
		fmt.Fprintln(output, "    Logs Directory:", cfg.System.LogDirectory)
 | 
			
		||||
		fmt.Fprintln(output, "    Data Directory:", cfg.System.Data)
 | 
			
		||||
		fmt.Fprintln(output, " Archive Directory:", cfg.System.ArchiveDirectory)
 | 
			
		||||
		fmt.Fprintln(output, "  Backup Directory:", cfg.System.BackupDirectory)
 | 
			
		||||
		fmt.Fprintln(output, "     Root Directory:", cfg.System.RootDirectory)
 | 
			
		||||
		fmt.Fprintln(output, "     Logs Directory:", cfg.System.LogDirectory)
 | 
			
		||||
		fmt.Fprintln(output, "     Data Directory:", cfg.System.Data)
 | 
			
		||||
		fmt.Fprintln(output, "  Archive Directory:", cfg.System.ArchiveDirectory)
 | 
			
		||||
		fmt.Fprintln(output, "   Backup Directory:", cfg.System.BackupDirectory)
 | 
			
		||||
		fmt.Fprintln(output, "")
 | 
			
		||||
		fmt.Fprintln(output, "          Username:", cfg.System.Username)
 | 
			
		||||
		fmt.Fprintln(output, "       Server Time:", time.Now().Format(time.RFC1123Z))
 | 
			
		||||
		fmt.Fprintln(output, "        Debug Mode:", cfg.Debug)
 | 
			
		||||
		fmt.Fprintln(output, "           Username:", cfg.System.Username)
 | 
			
		||||
		fmt.Fprintln(output, "        Server Time:", time.Now().Format(time.RFC1123Z))
 | 
			
		||||
		fmt.Fprintln(output, "         Debug Mode:", cfg.Debug)
 | 
			
		||||
	} else {
 | 
			
		||||
		fmt.Println("Failed to load configuration.", err)
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -140,7 +140,7 @@ func diagnosticsCmdRun(cmd *cobra.Command, args []string) {
 | 
			
		|||
		}
 | 
			
		||||
	}
 | 
			
		||||
	fmt.Fprintln(output, "LoggingDriver:", dockerInfo.LoggingDriver)
 | 
			
		||||
	fmt.Fprintln(output, "CgroupDriver:", dockerInfo.CgroupDriver)
 | 
			
		||||
	fmt.Fprintln(output, " CgroupDriver:", dockerInfo.CgroupDriver)
 | 
			
		||||
	if len(dockerInfo.Warnings) > 0 {
 | 
			
		||||
		for _, w := range dockerInfo.Warnings {
 | 
			
		||||
			fmt.Fprintln(output, w)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user