summaryrefslogtreecommitdiffstats
path: root/contrib/windows
diff options
context:
space:
mode:
authorThomas Boerger <thomas@webhippie.de>2017-03-15 13:30:00 +0100
committerGitHub <noreply@github.com>2017-03-15 13:30:00 +0100
commita06c3ad2c02a5473184711be6dbf1b30f0299e11 (patch)
treece0ac065a6afa843ce298d00d1761b5cf48accf9 /contrib/windows
parent09fe4a2ae9dfa8b3bc8a5039d0feab1e1a34d07b (diff)
downloadgitea-a06c3ad2c02a5473184711be6dbf1b30f0299e11.tar.gz
gitea-a06c3ad2c02a5473184711be6dbf1b30f0299e11.zip
Synced gitignores with github repo (#1245)
* Renamed scripts directory into contrib * Added script to download gitignores from github * Synced gitignores with github repo
Diffstat (limited to 'contrib/windows')
-rw-r--r--contrib/windows/install-as-service.bat25
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/windows/install-as-service.bat b/contrib/windows/install-as-service.bat
new file mode 100644
index 0000000000..4a513b7dcb
--- /dev/null
+++ b/contrib/windows/install-as-service.bat
@@ -0,0 +1,25 @@
+@ECHO off
+
+:: This script relies on nssm.exe to work.
+:: Please, download it and make it available on the system path,
+:: or copy it to the gogs path.
+:: https://nssm.cc/download
+:: This script itself should run in the gogs path, too.
+:: In case of startup failure, please read carefully the log file.
+:: Make sure Gitea work running manually with "gitea web" before running
+:: this script.
+:: And, please, read carefully the installation docs first:
+:: https://gogs.io/docs/installation
+:: To unistall the service, run "nssm remove gogs" and restart Windows.
+
+:: Set the folder where you extracted Gitea. Omit the last slash.
+SET gogspath=C:\gogs
+
+nssm install gogs "%gogspath%\gogs.exe"
+nssm set gogs AppParameters "web"
+nssm set gogs Description "A painless self-hosted Git service."
+nssm set gogs DisplayName "Gitea - Git with a cup of tea"
+nssm set gogs Start SERVICE_DELAYED_AUTO_START
+nssm set gogs AppStdout "%gogspath%\gogs.log"
+nssm start gogs
+pause