mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 19:06:18 +01:00 
			
		
		
		
	fix #2189
This commit is contained in:
		
							
								
								
									
										1
									
								
								gogs.go
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								gogs.go
									
									
									
									
									
								
							| @@ -12,7 +12,6 @@ import ( | ||||
| 	"runtime" | ||||
|  | ||||
| 	"github.com/codegangsta/cli" | ||||
| 	_ "github.com/kardianos/minwinsvc" | ||||
|  | ||||
| 	"github.com/gogits/gogs/cmd" | ||||
| 	"github.com/gogits/gogs/modules/setting" | ||||
|   | ||||
							
								
								
									
										15
									
								
								modules/setting/miniwinsvc.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								modules/setting/miniwinsvc.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| // +build miniwinsvc | ||||
|  | ||||
| // Copyright 2015 The Gogs Authors. All rights reserved. | ||||
| // Use of this source code is governed by a MIT-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| package setting | ||||
|  | ||||
| import ( | ||||
| 	_ "github.com/kardianos/minwinsvc" | ||||
| ) | ||||
|  | ||||
| func init() { | ||||
| 	SupportMiniWinService = true | ||||
| } | ||||
| @@ -183,6 +183,7 @@ var ( | ||||
| 	// Other settings | ||||
| 	ShowFooterBranding    bool | ||||
| 	ShowFooterVersion     bool | ||||
| 	SupportMiniWinService bool | ||||
|  | ||||
| 	// Global setting objects | ||||
| 	Cfg          *ini.File | ||||
|   | ||||
| @@ -82,6 +82,9 @@ func GlobalInit() { | ||||
| 	if models.EnableTidb { | ||||
| 		log.Info("TiDB Supported") | ||||
| 	} | ||||
| 	if setting.SupportMiniWinService { | ||||
| 		log.Info("Builtin Windows Service Supported") | ||||
| 	} | ||||
| 	checkRunMode() | ||||
|  | ||||
| 	if setting.StartSSHServer { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user