2015-10-29 03:45:32 +05:30
|
|
|
@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.
|
2016-12-02 10:48:58 +05:30
|
|
|
:: Make sure Gitea work running manually with "gogs web" before running
|
2015-10-29 03:45:32 +05:30
|
|
|
:: this script.
|
|
|
|
:: And, please, read carefully the installation docs first:
|
2016-08-06 06:05:40 +05:30
|
|
|
:: https://gogs.io/docs/installation
|
2015-10-29 03:45:32 +05:30
|
|
|
:: To unistall the service, run "nssm remove gogs" and restart Windows.
|
|
|
|
|
2016-12-02 10:48:58 +05:30
|
|
|
:: Set the folder where you extracted Gitea. Omit the last slash.
|
2015-10-29 03:45:32 +05:30
|
|
|
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."
|
2016-12-02 10:48:58 +05:30
|
|
|
nssm set gogs DisplayName "Gitea - Git with a cup of tea"
|
2015-10-29 03:45:32 +05:30
|
|
|
nssm set gogs Start SERVICE_DELAYED_AUTO_START
|
|
|
|
nssm set gogs AppStdout "%gogspath%\gogs.log"
|
|
|
|
nssm start gogs
|
|
|
|
pause
|