2e41d2b0a3
* added meta "gitlab.service" that work alike corresponding init.d script * new .service files with support for "reload" and propagation of "reload" from "gitlab.service" * non-forking PIDFILE-less implementation This commit fixes services' start-up and postinst error on first install.
34 lines
899 B
Desktop File
34 lines
899 B
Desktop File
[Unit]
|
|
Description=GitLab Sidekiq Worker
|
|
PartOf=gitlab.target
|
|
Requires=redis-server.service
|
|
Wants=postgresql.service
|
|
After=redis-server.service postgresql.service
|
|
PartOf=gitlab.service
|
|
ReloadPropagatedFrom=gitlab.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=gitlab
|
|
WorkingDirectory=/usr/share/gitlab
|
|
EnvironmentFile=/etc/gitlab/gitlab-debian.conf
|
|
SyslogIdentifier=gitlab-sidekiq
|
|
ExecStart=/usr/bin/bundle exec sidekiq \
|
|
-q post_receive \
|
|
-q mailers \
|
|
-q archive_repo \
|
|
-q system_hook \
|
|
-q project_web_hook \
|
|
-q gitlab_shell \
|
|
-q incoming_email \
|
|
-q runner \
|
|
-q common \
|
|
-q default \
|
|
-e $RAILS_ENV
|
|
Restart=on-abnormal
|
|
|
|
## No "Type=notify" support; wait for service to initialise:
|
|
ExecStartPost=-/bin/sh -c "for i in 4 4 4 4 4 4 4 4; do sleep $i; (ps -h -o command -p $MAINPID | grep -q -P \"sidekiq\s\d\.\d\.\d\") && exit 0; done"
|
|
|
|
[Install]
|
|
WantedBy=gitlab.target
|