]> git.openstreetmap.org Git - chef.git/commitdiff
Drop passenger cleanup script that is no longer needed
authorTom Hughes <tom@compton.nu>
Tue, 6 Dec 2022 20:24:28 +0000 (20:24 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 6 Dec 2022 20:25:11 +0000 (20:25 +0000)
cookbooks/web/recipes/rails.rb
cookbooks/web/templates/default/passenger.cron.erb [deleted file]

index b28e19ba7f260d2c762c20bea3ae7fa915f27540..6265f4f307c71125b56a30f54d8f0cd9310eed9a 100644 (file)
@@ -42,12 +42,8 @@ end
 
 nodejs_package "svgo"
 
-template "/etc/cron.hourly/passenger" do
-  cookbook "web"
-  source "passenger.cron.erb"
-  owner "root"
-  group "root"
-  mode "755"
+file "/etc/cron.hourly/passenger" do
+  action :delete
 end
 
 rails_directory = "#{node[:web][:base_directory]}/rails"
diff --git a/cookbooks/web/templates/default/passenger.cron.erb b/cookbooks/web/templates/default/passenger.cron.erb
deleted file mode 100644 (file)
index d3cef76..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-# Get a list of rack processes that are running
-pgrep -u rails -f Rack | sort > /tmp/rails.actual.$$
-
-# Get a list of rack processes we expect to be running
-PASSENGER_INSTANCE_REGISTRY_DIR=<%= node[:passenger][:instance_registry_dir] %> passenger-status | awk '/PID:/ { print $3 }' | sort > /tmp/rails.expected.$$
-
-# Get a list of unexpected rack processes
-pids=$(comm -23 /tmp/rails.actual.$$ /tmp/rails.expected.$$)
-
-# Kill any expected rack processes
-[ -n "$pids" ] && kill -9 $pids > /dev/null 2>&1
-
-# Remove our temporary files
-rm -f /tmp/rails.actual.$$ /tmp/rails.expected.$$