From 3843f96fb430880a7d6d0cd75b72940be3675d7c Mon Sep 17 00:00:00 2001 From: zedshaw Date: Sun, 21 May 2006 15:05:38 +0000 Subject: Fixed up messages for win32 related to signals. Applied Bradley Taylor's user:group patch v2. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@204 19e92222-5c0b-0410-8929-a290d50e31e9 --- bin/mongrel_rails | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/mongrel_rails b/bin/mongrel_rails index 14858bf..46c4dad 100644 --- a/bin/mongrel_rails +++ b/bin/mongrel_rails @@ -36,8 +36,8 @@ class Start < GemPlugin::Plugin "/commands" ['-C', '--config PATH', "Use a config file", :@config_file, nil], ['-S', '--script PATH', "Load the given file as an extra config script.", :@config_script, nil], ['-G', '--generate CONFIG', "Generate a config file for -C", :@generate, nil], - ['-u', '--user USER', "User to run as", :@user, nil], - ['-g', '--group GROUP', "Group to run as", :@group, nil] + ['', '--user USER', "User to run as", :@user, nil], + ['', '--group GROUP', "Group to run as", :@group, nil] ] end @@ -62,6 +62,7 @@ class Start < GemPlugin::Plugin "/commands" def valid_user?(user) valid?(Process.uid == 0, "You must be root to change the user.") + valid?(@group, "You must also specify a group.") begin Etc.getpwnam(user) rescue @@ -72,6 +73,7 @@ class Start < GemPlugin::Plugin "/commands" def valid_group?(group) valid?(Process.uid == 0, "You must be root to change the group.") + valid?(@user, "You must also specify a user.") begin Etc.getgrnam(group) rescue @@ -140,6 +142,7 @@ class Start < GemPlugin::Plugin "/commands" config.run config.log "Mongrel available at #{settings[:host]}:#{settings[:port]}" + config.log "Use CTRL-C to stop." if not @daemon config.join if config.needs_restart -- cgit v1.2.3-24-ge0c7