2

I got a new server with ubuntu 16.04 and installed gitblit GO.

  • extracted it to /opt/gitblit/
  • created user and group glitblit
  • gave rights to user: chown -R gitblit:gitblit /opt/gitblit
  • called install-service-ubuntu.sh - start/stop script was copied to /etc/init.d/gitblit
  • set server.httpPort = 8080 in /opt/data/gitblit/default.properties

When i start it manually with java -jar gitblit.jar --baseFolder data under /opt/gitblit/ it works and i can browse the site.

Starting the service with /etc/init.d/gitblit start does nothing:

/etc/init.d/gitblit start
[ ok ] Starting gitblit (via systemctl): gitblit.service.

In var/log/syslog i can only find one entry:

Aug  4 09:02:21 servername systemd[1]: Started LSB: Gitblit repository server.

Nothing of interest to find here: /opt/gitblit/data/logs/gitblit.log

Tried changing the path to the pid-file from /var/run/gitblit.pid to /tmp/gitblit.pid - no success.

What am I missing here? Why wont gitblit start as a service?

roeb
  • 141
  • 4

1 Answers1

2

so I got this running now by creating gitblit_server.service under /lib/systemd/system with the following content:

[Unit]
Description=gitblit Server CVS
After=network.target

[Service]
User=gitblit
Type=simple
WorkingDirectory=/opt/gitblit
PIDFile=/var/run/gitblit.service.pid
ExecStartPre=/opt/gitblit/java-proxy-config.sh
ExecStart=/usr/bin/java -server -Xmx1024M -Djava.awt.headless=true -jar /opt/gitblit/gitblit.jar --baseFolder /opt/gitblit/data --dailyLogFile

[Install]
WantedBy=multi-user.target

then enable this service by running

systemctl enable gitblit_server.service
dave.c
  • 103
  • 2
roeb
  • 141
  • 4