gitlabhq/gitlabhq — pull request #4324 by axilleas (2013-06-17 09:36:01+00:00)
Title: Removal of gitlab.socket should be in stop function too. Fix #4313

As @wojdec suggested in #4313, this fix first checks if `gitlab.socket` doesn't exist and iff the check returns a non-zero status (which means it exists), it then removes it.

I also removed the `&` in the restart function as I experienced some weird behaviour when I restarted the service (sidekiq didn't start after it stopped).

Tested on Debian 7.0, GitLab version `5.3.0.beta1`.