diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build.sh | 10 | ||||
-rw-r--r-- | scripts/init/freebsd/gogs | 2 | ||||
-rw-r--r-- | scripts/systemd/gogs.service | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/scripts/build.sh b/scripts/build.sh index ea43bdafcb..cf127c2aee 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -4,8 +4,14 @@ rm -rf $outPath mkdir $outPath go build ../gogs.go -chmod +x gogs -mv gogs $outPath/ +PLATFORM=`uname | cut -d _ -f 1` +if [ $PLATFORM = "MINGW32" ] || [ $PLATFORM = "MINGW64" ] || [ $PLATFORM = "CYGWIN" ]; then + GOGS_EXE=gogs.exe +else + GOGS_EXE=gogs +fi +chmod +x $GOGS_EXE +mv $GOGS_EXE $outPath/ cp -r ../conf/ $outPath/conf/ cp -r ../custom/ $outPath/custom/ diff --git a/scripts/init/freebsd/gogs b/scripts/init/freebsd/gogs index df13ee0d9c..e1d3bdee90 100644 --- a/scripts/init/freebsd/gogs +++ b/scripts/init/freebsd/gogs @@ -21,7 +21,7 @@ load_rc_config $name : ${gogs_enable:="NO"} : ${gogs_directory:="/home/git"} -command="${gogs_directory}/scripts/start.sh" +command="${gogs_directory}/gogs web" pidfile="${gogs_directory}/${name}.pid" diff --git a/scripts/systemd/gogs.service b/scripts/systemd/gogs.service index 7436e46ae6..95567eaa96 100644 --- a/scripts/systemd/gogs.service +++ b/scripts/systemd/gogs.service @@ -14,7 +14,7 @@ Group=git WorkingDirectory=/home/git/gogs ExecStart=/home/git/gogs/gogs web Restart=always -Environment="USER=git","HOME=/home/git" +Environment=USER=git HOME=/home/git [Install] WantedBy=multi-user.target |