Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

EventMachine receive_data_chunk actually passes an array of bytes, ad…

…ded some comments to daemon scripts
  • Loading branch information...
commit bc57b13d18855c28c9280fcf52d6785621e1bce1 1 parent 386d7b9
@corporealfunk authored
View
2  lib/eyepaste/smtp_server.rb
@@ -13,7 +13,7 @@ def receive_recipient(recipient)
end
def receive_data_chunk(data)
- @email_content << data if data
+ data.each { |byte| @email_content << byte }
true
end
View
3  scripts/smtp_server.rb
@@ -1,3 +1,6 @@
+# this is the actual main loop for the eyepaste SMTP
+# server, run via EventMachine
+
require 'rubygems'
require 'bundler/setup'
View
6 scripts/smtp_server_control.rb
@@ -1,3 +1,9 @@
+# this script daemonizes and "controls" the smtp_server.rb script
+# (using the Deamons gem which tracks pidfiles, stderr/out logging, etc)
+# this script should be called to start and stop the smtp_server like so:
+#
+# ruby smtp_server_control.rb (start|stop|restart|status)
+
require 'rubygems'
require 'bundler/setup'
View
2  scripts/smtp_server_init.sh
@@ -11,6 +11,8 @@
# Author: Jon Moniaci <jonmoniaci [at] gmail.com>
+# This is an example init.d script, currently tested on Debian squeeze
+
# change APP_ROOT and RUBY to match your eyepaste and ruby installation
APP_ROOT="/var/www/eyepaste/www.eyepaste.com"
RUBY="/usr/local/rvm/wrappers/ruby-1.9.2-p290/ruby"
Please sign in to comment.
Something went wrong with that request. Please try again.