Use passenger-config to restart passenger apps
authorTom Hughes <tom@compton.nu>
Wed, 8 Apr 2015 17:37:48 +0000 (18:37 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 8 Apr 2015 17:37:48 +0000 (18:37 +0100)
cookbooks/taginfo/templates/default/update-taginfo.erb
cookbooks/web/templates/default/logrotate.web.erb

index 417c30b..fd023ff 100644 (file)
@@ -19,6 +19,6 @@ mv $ROOT/data/taginfo-* $ROOT/data/old
 mv $ROOT/sources/taginfo-*.db $ROOT/sources/*/taginfo-*.db $ROOT/data
 mv $ROOT/sources/download/* $ROOT/download
 
-touch $ROOT/taginfo/web/tmp/restart.txt
+passenger-config restart-app $ROOT/taginfo/web
 
 find $ROOT/sources/log -mtime +28 -delete
index 9928841..a38a3e3 100644 (file)
@@ -11,7 +11,7 @@
   sharedscripts
   postrotate
 <% if File.directory?("#{node[:web][:base_directory]}/rails") -%>
-    /bin/touch <%= node[:web][:base_directory] %>/rails/tmp/restart.txt
+    /usr/bin/passenger-config restart-app <%= node[:web][:base_directory] %>/rails
 <% end -%>
 <% if File.directory?("#{node[:web][:base_directory]}/gpx-import") -%>
     /usr/bin/service gpx-import rotated