[5.2.1] init.d script error
Created by: wojdec
Details
When starting GitLab (5-2-stable @ 26ed59f1a5) with ini.d
script an error appear.
Command
#> service gitlab start
Output
rm: cannot remove `/home/git/gitlab/tmp/sockets/gitlab.socket': No such file or directory
Puma 2.0.1 starting...
* Min threads: 0, max threads: 16
* Environment: production
* Listening on tcp://127.0.0.1:9292
GitLab service started
Cause No check whether gitlab.socket exists. It doesn't exists when Puma uses tcp binding.
Solution
Add a check to init.d
script similar to this one below.
SOCKET_FILE=$SOCKET_PATH/gitlab.socket
! [ -e $SOCKET_FILE ] || execute "rm $SOCKET_FILE"