From 66d7adc3a8027177bb576190e288ae8b5e6173c2 Mon Sep 17 00:00:00 2001 From: Martin van Beurden Date: Sat, 9 May 2015 20:24:33 +0200 Subject: fix systemd "Trailing garbage, ignoring." warning. Environment should be a space-separated list instead of comma-separated. No need for double quoting when the values don't contain spaces. --- scripts/systemd/gogs.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/systemd/gogs.service b/scripts/systemd/gogs.service index 7436e46a..95567eaa 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 -- cgit v1.2.3 From 6eecbf17cd8be6c2ee7f935e53a45c4f41f86d04 Mon Sep 17 00:00:00 2001 From: Björn Date: Wed, 13 May 2015 14:15:05 +0200 Subject: fix debian init script - use start-stop-daemon's chuid feature insted of su - using `su -c` breaks if the git user has no usable shell - this fixes #1025 - put --test before --exec, instead it gets passed to gogs - set cwd via --chdir --- scripts/init/debian/gogs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/init/debian/gogs b/scripts/init/debian/gogs index 13e8b8aa..b0b52286 100644 --- a/scripts/init/debian/gogs +++ b/scripts/init/debian/gogs @@ -49,10 +49,12 @@ do_start() # 1 if daemon was already running # 2 if daemon could not be started sh -c "start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile \\ - --exec $DAEMON -- $DAEMON_ARGS --test > /dev/null \\ + --test --chdir $WORKINGDIR --chuid $USER \\ + --exec $DAEMON -- $DAEMON_ARGS > /dev/null \\ || return 1" sh -c "start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile \\ - --background --exec /bin/su -- - $USER -c \"cd \\\"$WORKINGDIR\\\" && $DAEMON -- $DAEMON_ARGS\" \\ + --background --chdir $WORKINGDIR --chuid $USER \\ + --exec $DAEMON -- $DAEMON_ARGS \\ || return 2" } -- cgit v1.2.3 From bfef8f0edd5f2c4afb1e2551a9e36c57508ad12d Mon Sep 17 00:00:00 2001 From: William Friesen Date: Tue, 9 Jun 2015 21:40:43 +1000 Subject: Fix command used by FreeBSD init script --- scripts/init/freebsd/gogs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/init/freebsd/gogs b/scripts/init/freebsd/gogs index df13ee0d..e1d3bdee 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" -- cgit v1.2.3 From 08f7547acf40c20eaaaaae3fdfc7835020d7d945 Mon Sep 17 00:00:00 2001 From: Linquize Date: Sat, 4 Apr 2015 19:23:53 +0800 Subject: Update build.sh for Windows --- scripts/build.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/build.sh b/scripts/build.sh index ea43bdaf..cf127c2a 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/ -- cgit v1.2.3