diff --git a/files/gitlab-cookbooks/runit/attributes/default.rb b/files/gitlab-cookbooks/runit/attributes/default.rb index f5fdca9..6623ab3 100644 --- a/files/gitlab-cookbooks/runit/attributes/default.rb +++ b/files/gitlab-cookbooks/runit/attributes/default.rb @@ -17,8 +17,8 @@ # limitations under the License. # -default[:runit][:sv_bin] = "/opt/chef-server/embedded/bin/sv" -default[:runit][:chpst_bin] = "/opt/chef-server/embedded/bin/chpst" -default[:runit][:service_dir] = "/opt/chef-server/service" -default[:runit][:sv_dir] = "/opt/chef-server/sv" +default[:runit][:sv_bin] = "/opt/gitlab/embedded/bin/sv" +default[:runit][:chpst_bin] = "/opt/gitlab/embedded/bin/chpst" +default[:runit][:service_dir] = "/opt/gitlab/service" +default[:runit][:sv_dir] = "/opt/gitlab/sv" diff --git a/files/gitlab-cookbooks/runit/definitions/runit_service.rb b/files/gitlab-cookbooks/runit/definitions/runit_service.rb index 5ac8479..f16ea2f 100644 --- a/files/gitlab-cookbooks/runit/definitions/runit_service.rb +++ b/files/gitlab-cookbooks/runit/definitions/runit_service.rb @@ -135,7 +135,7 @@ define :runit_service, :directory => nil, :only_if => false, :finish_script => f end if params[:init_script_template] - template "/opt/chef-server/init/#{params[:name]}" do + template "/opt/gitlab/init/#{params[:name]}" do owner params[:owner] group params[:group] mode 0755 @@ -146,7 +146,7 @@ define :runit_service, :directory => nil, :only_if => false, :finish_script => f end else if params[:active_directory] == node[:runit][:service_dir] - link "/opt/chef-server/init/#{params[:name]}" do + link "/opt/gitlab/init/#{params[:name]}" do to node[:runit][:sv_bin] end end diff --git a/files/gitlab-cookbooks/runit/files/default/chef-server-runsvdir.conf b/files/gitlab-cookbooks/runit/files/default/chef-server-runsvdir.conf index eda07fc..d4c88be 100644 --- a/files/gitlab-cookbooks/runit/files/default/chef-server-runsvdir.conf +++ b/files/gitlab-cookbooks/runit/files/default/chef-server-runsvdir.conf @@ -7,4 +7,4 @@ post-stop script # now owned by init (process 1). pkill -HUP -P 1 runsv$ end script -exec /opt/chef-server/embedded/bin/runsvdir-start +exec /opt/gitlab/embedded/bin/runsvdir-start diff --git a/files/gitlab-cookbooks/runit/recipes/sysvinit.rb b/files/gitlab-cookbooks/runit/recipes/sysvinit.rb index 70368e4..ebb5305 100644 --- a/files/gitlab-cookbooks/runit/recipes/sysvinit.rb +++ b/files/gitlab-cookbooks/runit/recipes/sysvinit.rb @@ -18,7 +18,7 @@ # # We assume you are sysvinit -svdir_line = 'CS:123456:respawn:/opt/chef-server/embedded/bin/runsvdir-start' +svdir_line = 'CS:123456:respawn:/opt/gitlab/embedded/bin/runsvdir-start' execute "echo '#{svdir_line}' >> /etc/inittab" do not_if "grep '#{svdir_line}' /etc/inittab" notifies :run, "execute[init q]", :immediately diff --git a/files/gitlab-cookbooks/runit/recipes/upstart.rb b/files/gitlab-cookbooks/runit/recipes/upstart.rb index 4949cf6..6b08034 100644 --- a/files/gitlab-cookbooks/runit/recipes/upstart.rb +++ b/files/gitlab-cookbooks/runit/recipes/upstart.rb @@ -18,30 +18,30 @@ # # Ensure the previous named iteration of the system job is nuked -execute "initctl stop opscode-runsvdir" do - only_if "initctl status opscode-runsvdir | grep start" +execute "initctl stop gitlab-runsvdir" do + only_if "initctl status gitlab-runsvdir | grep start" retries 30 end -file "/etc/init/opscode-runsvdir.conf" do +file "/etc/init/gitlab-runsvdir.conf" do action :delete end -cookbook_file "/etc/init/chef-server-runsvdir.conf" do +cookbook_file "/etc/init/gitlab-runsvdir.conf" do owner "root" group "root" mode "0644" - source "chef-server-runsvdir.conf" + source "gitlab-runsvdir.conf" end # Keep on trying till the job is found :( -execute "initctl status chef-server-runsvdir" do +execute "initctl status gitlab-runsvdir" do retries 30 end # If we are stop/waiting, start # # Why, upstart, aren't you idempotent? :( -execute "initctl start chef-server-runsvdir" do - only_if "initctl status chef-server-runsvdir | grep stop" +execute "initctl start gitlab-runsvdir" do + only_if "initctl status gitlab-runsvdir | grep stop" retries 30 end -- libgit2 0.21.2