mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-14 01:35:55 +09:00
#2852 code cleanup
This commit is contained in:
1 parent
1dd003bd4c
commit
a47aef5460
7 files changed
+31
-27
No files matched your search
@@ -3,7 +3,7 @@ Gogs - Go Git Service [
|
||||
|
||||
##### Current tip version: 0.9.73 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions)
|
||||
##### Current tip version: 0.9.74 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions)
|
||||
|
||||
| Web | UI | Preview |
|
||||
|:-------------:|:-------:|:-------:|
|
||||
|
||||
+15
-11
@@ -577,16 +577,19 @@ func runWeb(ctx *cli.Context) error {
|
||||
|
||||
// Flag for port number in case first time run conflict.
|
||||
if ctx.IsSet("port") {
|
||||
setting.AppUrl = strings.Replace(setting.AppUrl, setting.HttpPort, ctx.String("port"), 1)
|
||||
setting.HttpPort = ctx.String("port")
|
||||
setting.AppUrl = strings.Replace(setting.AppUrl, setting.HTTPPort, ctx.String("port"), 1)
|
||||
setting.HTTPPort = ctx.String("port")
|
||||
}
|
||||
|
||||
var err error
|
||||
listenAddr := fmt.Sprintf("%s:%s", setting.HttpAddr, setting.HttpPort)
|
||||
var listenAddr string
|
||||
if setting.Protocol == setting.UNIX_SOCKET {
|
||||
listenAddr = fmt.Sprintf("%s", setting.HttpAddr)
|
||||
listenAddr = fmt.Sprintf("%s", setting.HTTPAddr)
|
||||
} else {
|
||||
listenAddr = fmt.Sprintf("%s:%s", setting.HTTPAddr, setting.HTTPPort)
|
||||
}
|
||||
log.Info("Listen: %v://%s%s", setting.Protocol, listenAddr, setting.AppSubUrl)
|
||||
|
||||
var err error
|
||||
switch setting.Protocol {
|
||||
case setting.HTTP:
|
||||
err = http.ListenAndServe(listenAddr, m)
|
||||
@@ -597,18 +600,19 @@ func runWeb(ctx *cli.Context) error {
|
||||
err = fcgi.Serve(nil, m)
|
||||
case setting.UNIX_SOCKET:
|
||||
os.Remove(listenAddr)
|
||||
listener, err := net.ListenUnix("unix", &net.UnixAddr{listenAddr, "unix"})
|
||||
|
||||
var listener *net.UnixListener
|
||||
listener, err = net.ListenUnix("unix", &net.UnixAddr{listenAddr, "unix"})
|
||||
if err != nil {
|
||||
break
|
||||
break // Handle error after switch
|
||||
}
|
||||
// FIXME add proper implementation of signal capture on all protocols
|
||||
|
||||
// FIXME: add proper implementation of signal capture on all protocols
|
||||
// execute this on SIGTERM or SIGINT: listener.Close()
|
||||
err = os.Chmod(listenAddr, os.FileMode(setting.UnixSocketPermission))
|
||||
if err != nil {
|
||||
if err = os.Chmod(listenAddr, os.FileMode(setting.UnixSocketPermission)); err != nil {
|
||||
log.Fatal(4, "Failed to set permission of unix socket: %v", err)
|
||||
}
|
||||
err = http.Serve(listener, m)
|
||||
|
||||
default:
|
||||
log.Fatal(4, "Invalid protocol: %s", setting.Protocol)
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
const APP_VER = "0.9.73.0811"
|
||||
const APP_VER = "0.9.74.0811"
|
||||
|
||||
func init() {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
|
||||
@@ -286,7 +286,7 @@ func (fi bindataFileInfo) Sys() interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
var _confAppIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x5a\x5b\x6f\x23\xc9\x75\x7e\xef\x5f\x51\xab\xcd\x66\x66\x82\x26\xa9\xcb\x68\x46\x2b\x5b\xce\x52\x64\x93\xa2\x87\x37\x77\x53\x33\x3b\x3b\x10\x5a\x2d\x76\x91\xec\x55\xb3\x9b\xdb\xd5\x94\x46\x8b\x20\xb0\x91\x87\x5c\x80\x20\x0f\x09\x12\x04\x08\x82\xe4\x21\x31\xe0\xdc\x6c\xe4\xc5\x9b\x6c\xf2\xb2\xc9\xfb\xec\x7f\x70\xd6\xf1\x93\xff\x42\xbe\x73\xaa\x9a\x6c\x6a\xb4\x8a\x17\x48\xec\x1d\xb1\x2f\x55\xa7\xea\xdc\xbf\x73\xaa\xdf\x15\x7d\xe7\xb9\xe3\x0a\xfe\xd3\x1b\x34\x3b\xad\x97\x62\x74\xd2\xf1\x44\xab\xd3\x75\xac\x77\xc5\xb0\xeb\xd4\x3d\x47\xf4\xea\xcf\x1c\xd1\x38\xa9\xf7\xdb\x8e\x27\x06\x7d\xd1\x18\xb8\xae\xe3\x0d\x07\xfd\x66\xa7\xdf\x16\x8d\x53\x6f\x34\xe8\xe1\x61\xbf\xd5\x69\xeb\x99\xd6\xb7\x44\x7d\xb1\x10\x49\x30\x97\x22\x9f\x05\xb9\x50\xb3\xf4\x5a\x89\x34\x11\xf2\x4a\x66\x37\x62\x11\x4c\xf1\x22\xca\x63\x69\xd5\x87\x43\xbf\x5f\xef\x39\xe2\x48\xb4\xd3\xa9\x3a\xc4\x5f\xd1\x8e\x72\xe1\xc9\xec\x2a\x1a\x4b\x50\x6a\xcc\x82\x04\xc3\xf1\x2c\x9a\x88\x9b\x74\x29\xb2\x65\x22\xe2\x74\x1c\xc4\xf1\x8d\xe5\x9e\xf6\xfd\x53\x0f\xbb\x3f\x12\xd3\x28\xc7\x68\x27\xca\x67\x32\x13\x5b\xa1\xbc\xda\xb2\xc5\xd6\x22\x4b\xc3\x2d\x91\xe2\x41\x2e\x55\x8e\x27\xa1\x9c\x04\xcb\x18\xb4\x94\x1e\xc3\x14\xc0\x3a\x6d\x00\xf7\x96\xf5\x2a\x93\x8b\x54\x45\x79\x9a\xdd\x9c\x59\xee\x60\x30\x12\x47\x96\xd7\x70\x3b\xc3\x91\x3f\x7a\x39\xa4\x61\x17\x81\x9a\x61\xa5\xa6\xa1\x54\xef\x7b\x1d\x31\x9e\x05\x99\x92\xb9\x45\x37\x3e\x44\xe5\x7a\x0e\x4d\xfc\x96\x68\xa5\xd9\x58\x1a\xb6\x13\x79\x2d\xd6\xd4\x45\x9e\x8a\x0b\x29\x16\x59\x74\x15\xe4\xd2\x6a\x0d\xdc\x86\xe3\x0f\xdd\xce\xf3\xfa\x88\x56\x99\x04\xb1\x22\xf6\xdb\x71\x7a\x11\xc4\x62\x1e\xbc\x8e\xe6\xcb\xb9\x18\x67\x32\xc8\x23\x48\x32\x8e\xe6\x10\x49\x3a\x29\x53\x5c\x80\xf3\xa5\x92\x99\x2d\x2a\x3b\x62\x2e\x83\x44\x89\x24\xd5\x23\xad\x5e\xfd\x43\xbf\xe1\x3a\xf5\x51\x67\xd0\xf7\xbb\x9d\x5e\x07\xfb\xc3\x30\xac\x30\x0c\xf2\xf1\x4c\x90\x7c\xc4\x27\x4b\xb9\x94\x22\x96\xc9\x34\x9f\xd9\x58\xf3\x92\xe5\x1e\x28\x11\x07\x19\x74\x80\x0b\xac\xa5\xa2\x0b\x28\x6e\x78\xda\xed\xfa\xae\xf3\xbd\x53\xc7\x1b\xf9\xf8\x7b\xea\xf8\x5d\xa7\xdf\x1e\x9d\x80\xec\xce\x36\xfe\x07\x51\x2e\xa3\x33\xd0\xef\x2f\xe7\x17\xd8\x58\x79\xab\x91\x54\xda\x30\x82\x4c\xb2\x71\xc8\x50\x44\x09\x0c\x04\xa2\x7a\xbd\x88\x53\x3c\x25\x1b\xb1\x9c\x0f\x87\xdd\x81\x0b\xb1\xd4\xdb\x30\x35\xbf\x7f\xda\x03\xf5\xdd\xed\x0d\xa2\x91\x52\xcb\xaf\x27\xc7\x64\x3a\x9e\x77\x7a\x8b\xc8\xce\x26\x91\x95\x78\xd3\x39\x84\xa5\x6e\x11\x09\xc6\x79\x74\x15\xe5\x37\x62\x22\x65\x68\xb5\x1c\xa7\xe9\xb3\x38\x07\x3d\x88\xd1\x10\xdc\x07\xbd\xe7\x41\x0c\xf1\x81\xdc\x39\x8c\x70\x2e\x2b\xe3\x14\xac\x9c\x43\x13\x79\x20\xf2\x60\x6a\x93\x72\x42\x71\x71\x23\xea\x49\x98\xa5\x51\x28\xbe\x83\x79\x55\xda\x49\x3d\xc1\x5a\x57\x41\x8c\x67\x3c\x09\x4a\x83\xec\xb7\x12\xac\xae\xcd\x37\x8c\x54\x00\xb1\x6f\x89\xeb\x28\x8e\xc5\x2c\xb8\x22\xcf\x92\x2b\x73\x56\xf9\x4d\x4c\xd6\xd2\x23\xd1\x45\xc9\x24\x3d\x14\xb3\x3c\x5f\xa8\xc3\x5a\x0d\x56\x2d\xe3\x14\xa6\xa1\xaa\xd3\x34\x9d\xc6\xb2\x0a\x26\x6b\xd7\xf2\xa2\xb6\x5c\x84\xb0\x3c\x55\xdb\xdd\xde\x79\x5c\xdb\xd9\xa9\x79\xcb\xc5\x22\xcd\xf2\xca\x24\xcd\x2a\x25\x06\x2a\x51\x52\x69\xcc\xb2\x14\xf7\x7b\xef\xf3\x4b\xb3\x7d\x6b\x74\xe2\xf4\x1c\x88\x01\x3a\xf2\x7b\xce\xa8\xee\x8f\xea\x6d\x88\xe2\xfc\xdd\xc9\x64\x7f\xef\xf1\xde\x39\x6d\x28\x78\x2d\x54\xf4\x29\x4b\x65\x12\xc5\xa4\x28\x36\x7b\xf0\xb3\x88\x83\x1b\x88\xe3\xa1\xe1\x41\x91\x4f\x1e\xf4\xa2\xe3\x47\x6c\xab\xcd\x8e\x37\xec\xd6\x5f\xfa\x14\x50\x7c\xaf\xf3\x11\xf9\xc4\xc1\xde\xc1\xc1\x93\xed\x03\xb6\xac\x6a\x10\xce\xa3\x64\xd3\xbe\xc8\xf6\xef\xb7\x04\x8a\x15\x9b\x86\xb0\xbf\xfd\xb6\x89\xde\x4b\xc2\x75\x86\x83\x7b\x49\x24\x69\x8e\xc8\x75\x3f\x91\xfe\x60\xd4\x69\xdc\xb6\xeb\xfd\x0d\x32\x69\x36\x0d\x92\xe8\x53\xed\xed\xf7\xd1\x1a\xb8\xed\xb7\xf6\xc3\x12\x22\x71\xdc\xe1\x80\xdf\x90\xbb\x9d\x7d\x50\x9b\x07\xd9\x65\x98\x5e\xb3\xbc\x9d\x84\x2c\x11\x36\x98\x85\x30\x53\x4c\xbc\x40\x4c\xba\x84\xe3\xe6\x32\x51\xd8\xac\xe5\xf4\xeb\xc7\x50\x1a\xa2\x60\x13\x91\xa6\xef\xf8\xc7\x88\x3b\xcf\x4a\x31\xad\x1b\x29\x0e\x5d\xe3\xa5\xca\xd3\xb9\x38\x75\xbb\x15\x6f\x4c\x06\x57\xda\x1b\xc2\x3b\x6f\x8e\x82\x4f\x94\x5c\x2a\x71\x3d\x93\x09\x18\x48\x42\x99\x45\xc9\x14\x86\xa5\x77\x04\x72\x30\x49\xac\x1e\xcc\x17\xd8\x15\xb2\x80\x3d\x0f\xa6\x09\x62\xb1\x4e\x4c\x3e\xa8\xfb\x5e\x83\x2c\xd5\x43\x44\xb6\x5e\x41\x28\x57\x24\x97\xa1\x3b\x18\x0d\x60\xbb\xd8\x17\xb9\x8a\xd5\x1c\xf4\xea\x9d\x3e\xee\x38\xb7\xcc\x52\x95\x73\xf8\xa7\xf9\x78\xf8\xde\xc3\x62\xfc\x23\x72\xaa\xf7\x1e\xea\xe1\xb8\x79\xef\xe1\xc9\x68\x34\xf4\x87\x03\x77\xf4\x48\xd5\x2c\xbe\xa9\x37\x9b\x94\x92\xb6\xab\xfc\x7f\x6b\x35\x00\xcf\xf6\x28\x34\x42\x04\xb4\x88\x78\xd8\xec\x7d\xf4\x88\xf8\x67\x1e\x28\x01\x8a\xeb\x34\xbb\x24\x2b\x7e\xa8\x96\x88\xca\xe0\xde\xf3\x4e\x84\xf6\xd4\x47\x08\x44\x30\x2c\x45\xec\xc3\x7f\x85\xd2\x39\xb2\x0a\x72\x9d\x44\xcc\xb1\x63\x31\x0e\x14\x84\x48\x59\x32\x4c\xc9\x10\x91\x73\x20\x43\xb8\xdc\x58\x67\xd1\x72\xcc\xb8\xa2\x68\x45\x93\xeb\x71\x0e\xf3\xa0\x6c\x92\xc4\x37\x26\xcb\x66\xbc\xae\x96\x15\x08\x85\x92\Line truncated
|
||||
var _confAppIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x5a\x5b\x6f\x23\xc9\x75\x7e\xef\x5f\x51\xab\xcd\x66\x34\x41\x93\xba\x8d\x34\x5a\xd9\x72\x96\x22\x9b\x14\x3d\xbc\xb9\x9b\x9a\xd9\xd9\x81\xd0\x6a\xb1\x8b\x64\xaf\x9a\xdd\xdc\xae\xa6\x34\x5a\x04\x81\x8d\x3c\xe4\x02\x04\x79\x48\x90\x20\x40\x10\x24\x0f\x89\x01\xe7\x66\x23\x2f\xde\x64\x93\x97\x4d\xde\x67\xff\x83\xb3\x8e\x9f\xfc\x17\xf2\x9d\x53\xd5\x64\x53\xa3\x55\xbc\x40\x62\xef\x88\x7d\xa9\x3a\x75\xea\x5c\xbf\x73\xaa\xdf\x15\x3d\xe7\xb9\xe3\x0a\xfe\xd3\xed\x37\xda\xcd\x97\x62\x78\xda\xf6\x44\xb3\xdd\x71\xac\x77\xc5\xa0\xe3\xd4\x3c\x47\x74\x6b\xcf\x1c\x51\x3f\xad\xf5\x5a\x8e\x27\xfa\x3d\x51\xef\xbb\xae\xe3\x0d\xfa\xbd\x46\xbb\xd7\x12\xf5\x33\x6f\xd8\xef\xe2\x61\xaf\xd9\x6e\xe9\x99\xd6\xb7\x44\x6d\x3e\x17\x49\x30\x93\x22\x9f\x06\xb9\x50\xd3\xf4\x46\x89\x34\x11\xf2\x5a\x66\xb7\x62\x1e\x4c\xf0\x22\xca\x63\x69\xd5\x06\x03\xbf\x57\xeb\x3a\xe2\x58\xb4\xd2\x89\x3a\xc2\x5f\xd1\x8a\x72\xe1\xc9\xec\x3a\x1a\x49\x50\xaa\x4f\x83\x04\xc3\xf1\x2c\x1a\x8b\xdb\x74\x21\xb2\x45\x22\xe2\x74\x14\xc4\xf1\xad\xe5\x9e\xf5\xfc\x33\x0f\xdc\x1f\x8b\x49\x94\x63\xb4\x13\xe5\x53\x99\x89\x8d\x50\x5e\x6f\xd8\x62\x63\x9e\xa5\xe1\x86\x48\xf1\x20\x97\x2a\xc7\x93\x50\x8e\x83\x45\x0c\x5a\x4a\x8f\x61\x0a\xd8\x3a\x31\x80\x7b\xcb\x7a\x95\xc9\x79\xaa\xa2\x3c\xcd\x6e\xcf\x2d\xb7\xdf\x1f\x8a\x63\xcb\xab\xbb\xed\xc1\xd0\x1f\xbe\x1c\xd0\xb0\xcb\x40\x4d\xb1\x52\xc3\x50\xaa\xf5\xbc\xb6\x18\x4d\x83\x4c\xc9\xdc\xa2\x1b\x1f\xa2\x72\x3d\x87\x26\x7e\x4b\x34\xd3\x6c\x24\xcd\xb6\x13\x79\x23\x56\xd4\x45\x9e\x8a\x4b\x29\xe6\x59\x74\x1d\xe4\xd2\x6a\xf6\xdd\xba\xe3\x0f\xdc\xf6\xf3\xda\x90\x56\x19\x07\xb1\xa2\xed\xb7\xe2\xf4\x32\x88\xc5\x2c\x78\x1d\xcd\x16\x33\x31\xca\x64\x90\x47\x90\x64\x1c\xcd\x20\x92\x74\x5c\xa6\x38\xc7\xce\x17\x4a\x66\xb6\xa8\xec\x88\x99\x0c\x12\x25\x92\x54\x8f\xb4\xba\xb5\x0f\xfd\xba\xeb\xd4\x86\xed\x7e\xcf\xef\xb4\xbb\x6d\xf0\x87\x61\x58\x61\x10\xe4\xa3\xa9\x20\xf9\x88\x4f\x16\x72\x21\x45\x2c\x93\x49\x3e\xb5\xb1\xe6\x15\xcb\x3d\x50\x22\x0e\x32\xe8\x00\x17\x58\x4b\x45\x97\x50\xdc\xe0\xac\xd3\xf1\x5d\xe7\x7b\x67\x8e\x37\xf4\xf1\xf7\xcc\xf1\x3b\x4e\xaf\x35\x3c\x05\xd9\x9d\x6d\xfc\x0f\xa2\x5c\x44\xe7\xa0\xdf\x5b\xcc\x2e\xc1\x58\x99\xd5\x48\x2a\x6d\x18\x41\x26\xd9\x38\x64\x28\xa2\x04\x06\x02\x51\xbd\x9e\xc7\x29\x9e\x92\x8d\x58\xce\x87\x83\x4e\xdf\x85\x58\x6a\x2d\x98\x9a\xdf\x3b\xeb\x82\xfa\xee\xf6\x1a\xd1\x48\xa9\xc5\xd7\x93\x63\x32\x6d\xcf\x3b\xbb\x43\x64\x67\x9d\xc8\x52\xbc\xe9\x0c\xc2\x52\x77\x88\x04\xa3\x3c\xba\x8e\xf2\x5b\x31\x96\x32\xb4\x9a\x8e\xd3\xf0\x59\x9c\xfd\x2e\xc4\x68\x08\xee\x83\xde\xf3\x20\x86\xf8\x40\xee\x02\x46\x38\x93\x95\x51\x8a\xad\x5c\x40\x13\x79\x20\xf2\x60\x62\x93\x72\x42\x71\x79\x2b\x6a\x49\x98\xa5\x51\x28\xbe\x83\x79\x55\xe2\xa4\x96\x60\xad\xeb\x20\xc6\x33\x9e\x04\xa5\x41\xf6\x1b\x09\x56\xd7\xe6\x1b\x46\x2a\x80\xd8\x37\xc4\x4d\x14\xc7\x62\x1a\x5c\x93\x67\xc9\xa5\x39\xab\xfc\x36\x26\x6b\xe9\x92\xe8\xa2\x64\x9c\x1e\x89\x69\x9e\xcf\xd5\xd1\xd6\x16\xac\x5a\xc6\x29\x4c\x43\x55\x27\x69\x3a\x89\x65\x15\x9b\xdc\xba\x91\x97\x5b\x8b\x79\x08\xcb\x53\x5b\xbb\xdb\x3b\x4f\xb6\x76\x76\xb6\xbc\xc5\x7c\x9e\x66\x79\x65\x9c\x66\x95\xd2\x06\x2a\x51\x52\xa9\x4f\xb3\x14\xf7\x7b\xef\xf3\x4b\xc3\xbe\x35\x3c\x75\xba\x0e\xc4\x00\x1d\xf9\x5d\x67\x58\xf3\x87\xb5\x16\x44\x71\xf1\xee\x78\xbc\xbf\xf7\x64\xef\x82\x18\x0a\x5e\x0b\x15\x7d\xca\x52\x19\x47\x31\x29\x8a\xcd\x1e\xfb\x99\xc7\xc1\x2d\xc4\xb1\x69\xf6\xa0\xc8\x27\x0f\xbb\xd1\xc9\x63\xb6\xd5\x46\xdb\x1b\x74\x6a\x2f\x7d\x0a\x28\xbe\xd7\xfe\x88\x7c\xe2\x70\xef\xf0\xf0\x60\xfb\x90\x2d\xab\x1a\x84\xb3\x28\x59\xb7\x2f\xb2\xfd\x87\x2d\x81\x62\xc5\xba\x21\xec\x6f\xbf\x6d\xa2\x0f\x92\x70\x9d\x41\xff\x41\x12\x49\x9a\x23\x72\x3d\x4c\xa4\xd7\x1f\xb6\xeb\x77\xed\x7a\x7f\x8d\x4c\x9a\x4d\x82\x24\xfa\x54\x7b\xfb\x43\xb4\xfa\x6e\xeb\x2d\x7e\x58\x42\x24\x8e\x7b\x1c\xf0\x1b\xee\x6e\x67\x1f\xd4\x66\x41\x76\x15\xa6\x37\x2c\x6f\x27\x21\x4b\x84\x0d\x66\x21\xcc\x14\x13\x2f\x11\x93\xae\xe0\xb8\xb9\x4c\x14\x98\xb5\x9c\x5e\xed\x04\x4a\x43\x14\x6c\x20\xd2\xf4\x1c\xff\x04\x71\xe7\x59\x29\xa6\x75\x22\xc5\xa1\x6b\xb4\x50\x79\x3a\x13\x67\x6e\xa7\xe2\x8d\xc8\xe0\x4a\xbc\x21\xbc\x33\x73\x14\x7c\xa2\xe4\x4a\x89\x9b\xa9\x4c\xb0\x81\x24\x94\x59\x94\x4c\x60\x58\x9a\x23\x90\x83\x49\x62\xf5\x60\x36\x07\x57\xc8\x02\xf6\x2c\x98\x24\x88\xc5\x3a\x31\xf9\xa0\xee\x7b\x75\xb2\x54\x0f\x11\xd9\x7a\x05\xa1\x5c\x93\x5c\x06\x6e\x7f\xd8\x87\xed\x82\x2f\x72\x15\xab\xd1\xef\xd6\xda\x3d\xdc\x71\x6e\x99\xa6\x2a\xe7\xf0\x4f\xf3\xf1\xf0\xbd\xcd\x62\xfc\x63\x72\xaa\xf7\x36\xf5\x70\xdc\xbc\xb7\x79\x3a\x1c\x0e\xfc\x41\xdf\x1d\x3e\x56\x5b\x16\xdf\xd4\x1a\x0d\x4a\x49\xdb\x55\xfe\xbf\xb5\x1c\x80\x67\x7b\x14\x1a\x11\x74\x65\x36\x43\xe4\x22\xdd\x12\xfb\x8b\x24\x82\x9f\xa4\xa3\x2b\xf0\x7d\xd6\x6b\x7f\xe8\x7b\xfd\xfa\x33\x67\xe8\x0f\x1c\xb7\x8b\xe8\x85\x98\x8d\xa9\x07\x07\x07\x24\x3c\x62\x4f\x6c\x36\xba\x1f\x3d\x26\xc9\xf1\x74\x4a\x9d\xe2\x26\xcd\xae\xc8\xfe\x37\xd5\x02\xf1\x1c\x72\xf3\xbc\x53\xa1\x7d\xfc\x31\x42\x18\x4c\x52\x91\xe0\xe0\xf9\x42\xe9\xec\x5a\x05\xb9\x76\x22\x66\xd8\xab\x18\x05\x0a\xe2\Line truncated
|
||||
|
||||
func confAppIniBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
@@ -301,7 +301,7 @@ func confAppIni() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "conf/app.ini", size: 12279, mode: os.FileMode(420), modTime: time.Unix(1470921244, 0)}
|
||||
info := bindataFileInfo{name: "conf/app.ini", size: 12337, mode: os.FileMode(420), modTime: time.Unix(1470952001, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
+10
-10
@@ -62,7 +62,7 @@ var (
|
||||
// Server settings
|
||||
Protocol Scheme
|
||||
Domain string
|
||||
HttpAddr, HttpPort string
|
||||
HTTPAddr, HTTPPort string
|
||||
LocalURL string
|
||||
OfflineMode bool
|
||||
DisableRouterLog bool
|
||||
@@ -372,17 +372,17 @@ func NewContext() {
|
||||
Protocol = FCGI
|
||||
} else if sec.Key("PROTOCOL").String() == "unix" {
|
||||
Protocol = UNIX_SOCKET
|
||||
UnixSocketPermissionRaw := sec.Key("UNIX_SOCKET_PERMISSION").MustString("666")
|
||||
UnixSocketPermissionParsed, err := strconv.ParseUint(UnixSocketPermissionRaw, 8, 32)
|
||||
if err != nil || UnixSocketPermissionParsed > 0777 {
|
||||
log.Fatal(4, "Fail to parse unixSocketPermission: %s", UnixSocketPermissionRaw)
|
||||
}
|
||||
UnixSocketPermission = uint32(UnixSocketPermissionParsed)
|
||||
}
|
||||
Domain = sec.Key("DOMAIN").MustString("localhost")
|
||||
HttpAddr = sec.Key("HTTP_ADDR").MustString("0.0.0.0")
|
||||
HttpPort = sec.Key("HTTP_PORT").MustString("3000")
|
||||
LocalURL = sec.Key("LOCAL_ROOT_URL").MustString(string(Protocol) + "://localhost:" + HttpPort + "/")
|
||||
UnixSocketPermissionRaw := sec.Key("UNIX_SOCKET_PERMISSION").MustString("666")
|
||||
UnixSocketPermissionParsed, err := strconv.ParseUint(UnixSocketPermissionRaw, 8, 32)
|
||||
if err != nil || UnixSocketPermissionParsed > 0777 {
|
||||
log.Fatal(4, "Fail to parse unixSocketPermission: %s", UnixSocketPermissionRaw)
|
||||
}
|
||||
UnixSocketPermission = uint32(UnixSocketPermissionParsed)
|
||||
HTTPAddr = sec.Key("HTTP_ADDR").MustString("0.0.0.0")
|
||||
HTTPPort = sec.Key("HTTP_PORT").MustString("3000")
|
||||
LocalURL = sec.Key("LOCAL_ROOT_URL").MustString(string(Protocol) + "://localhost:" + HTTPPort + "/")
|
||||
OfflineMode = sec.Key("OFFLINE_MODE").MustBool()
|
||||
DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool()
|
||||
StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString(workDir)
|
||||
|
||||
+1
-1
@@ -153,7 +153,7 @@ func Install(ctx *context.Context) {
|
||||
|
||||
form.Domain = setting.Domain
|
||||
form.SSHPort = setting.SSH.Port
|
||||
form.HTTPPort = setting.HttpPort
|
||||
form.HTTPPort = setting.HTTPPort
|
||||
form.AppUrl = setting.AppUrl
|
||||
form.LogRootPath = setting.LogRootPath
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
0.9.73.0811
|
||||
0.9.74.0811
|
||||
Reference in new issue
Block a user