diff --git a/templates/etc/init/mailcatcher.sysv.erb b/templates/etc/init/mailcatcher.sysv.erb index 608a60d..97e8164 100755 --- a/templates/etc/init/mailcatcher.sysv.erb +++ b/templates/etc/init/mailcatcher.sysv.erb @@ -11,7 +11,7 @@ PID="" updatepid(){ - PID=$(ps aux|grep "ruby /usr/bin/[m]ailcatcher" |awk '{print $2}') + PID=$(ps aux|grep -E "ruby(-.*)* <%= @mailcatcher_path %>/[m]ailcatcher" |awk '{print $2}') } start(){ @@ -20,7 +20,7 @@ start(){ echo "Mailcatcher is already running." exit 1 else - /usr/bin/mailcatcher <%= @options.join(' ') %> + <%= @mailcatcher_path %>/mailcatcher <%= @options.join(' ') %> fi }