]> source.dussan.org Git - gitea.git/commitdiff
add start.sh+bat
authorskyblue <ssx205@gmail.com>
Mon, 31 Mar 2014 07:54:15 +0000 (15:54 +0800)
committerskyblue <ssx205@gmail.com>
Mon, 31 Mar 2014 07:54:15 +0000 (15:54 +0800)
.gobuild.yml
start.bat [new file with mode: 0644]
start.sh [new file with mode: 0755]
web.go

index 78a38f2d31d87247b6418ab5355c62d5763fe7bf..d5bc6606c1119e6182a0e55b4a1af71b95662559 100644 (file)
@@ -5,4 +5,6 @@ filesets:
         - conf
         - LICENSE
         - README.md
-        - README_ZH.md
\ No newline at end of file
+        - README_ZH.md
+        - start.bat
+        - start.sh
diff --git a/start.bat b/start.bat
new file mode 100644 (file)
index 0000000..02972b9
--- /dev/null
+++ b/start.bat
@@ -0,0 +1,2 @@
+@echo off
+gogs.exe web
diff --git a/start.sh b/start.sh
new file mode 100755 (executable)
index 0000000..331d340
--- /dev/null
+++ b/start.sh
@@ -0,0 +1,6 @@
+#!/bin/bash -
+#
+# start gogs web
+#
+cd "$(dirname $0)"
+./gogs web
diff --git a/web.go b/web.go
index 412dcb622b3d5c53ad2b31f04ef9915113871130..cdec9232a9dd412883b81c3497da2c0e625de7fc 100644 (file)
--- a/web.go
+++ b/web.go
@@ -160,6 +160,7 @@ func runWeb(*cli.Context) {
                base.Cfg.MustValue("server", "HTTP_PORT", "3000"))
        log.Info("Listen: %s", listenAddr)
        if err := http.ListenAndServe(listenAddr, m); err != nil {
-               log.Critical(err.Error())
+               fmt.Println(err.Error())
+               //log.Critical(err.Error()) // not working now
        }
 }