Having said that GO does create log files. They should be located in
a "logs" folder wherever you unpacked the GO zip file.
> In addition, the current gitlab init.d script runs as root, I'm not
> that good with bash, but I think it would be better if there was a way
> to specify it to run with a less privileged user.
I can not speak for Gitlab, that is not my project.
-J
Below is a revised script that I am using on Ubuntu Server 11.04. The
console output is redirected to a log file. You don't get rotation,
etc, but it is a start. Alternatively, you could install Tomcat and
use the WAR build.
#!/bin/sh
set -e
GITBLIT_PATH=/shares/gitblit/
GITBLIT_HTTP_PORT=0
GITBLIT_HTTPS_PORT=8443
JAVA="java -server -Xmx1024M -jar"
. /lib/lsb/init-functions
case "$1" in
start)
log_action_begin_msg "Starting gitblit server"
cd $GITBLIT_PATH
$JAVA $GITBLIT_PATH/gitblit.jar --httpsPort
$GITBLIT_HTTPS_PORT --httpPort $GITBLIT_HTTP_PORT >
/var/log/gitblit.log &
log_action_end_msg $?
;;
stop)
log_action_begin_msg "Stopping gitblit server"
cd $GITBLIT_PATH
$JAVA $GITBLIT_PATH/gitblit.jar --stop &
log_action_end_msg $?
;;
force-reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/gitblit {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
Sorry, that was a typo, I meant GitBlit not Gitlab.
- Drew
In addition, the init.d script that you have will run gitblit as root, no? usually you need to "su" to a less privileged user.
- Drew
-J
Thanks again for creating GitBlit. I'm really starting to like it.
-- Drew
-J
I still prefer using GitBlit GO if I can get the custom logging and AJP connector.
-- Drew
On Feb 2, 2012, at 9:37 AM, James Moger wrote:
-J
Open an issue for this and I'll see what I can do.
-J
-- Drew