Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !4920

Merged
Created Aug 27, 2013 by Administrator@rootOwner

Rewrote init script.

  • Overview 42
  • Commits 6
  • Changes 2

Created by: Rovanion

Rewrite of the GitLab init-script providing the following features:

  • Conforms to the Debian, and inherently Ubuntu, init-script guidelines.
    • Is a valid POSIX or /bin/sh script as demanded by the guidelines.
  • Keeps track of the Unicorn and Sidekiq and their state separately.
    • Makes sure that both services start and stop appropriately before telling the user that they are or aren't running.
    • Handles cases where one service started and the other didn't. Highlighting it with a red warning text.
    • Knows the running state of both, not just the pids.
    • No longer uses the error prone "ps aux | grep $pid" method for finding out state.
    • Deals with stale pids caused by application crashes.
  • User set variables are properly escaped, ensures that paths with spaces in them work.
  • No more commands in variables as that sometimes leads to odd edge-cases.
  • The script now always runs as the $app_user, not as root or any other user.
  • No longer swallows errors produced.
    • This was my initial reason for rewriting the script: GitLab didn't start after an upgrade and there were nothing in the logs and no errors printed by the init script.
  • Has passed the peer review of #bash on irc.freenode.org
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: github/fork/Rovanion/init-rewrite