summaryrefslogtreecommitdiff
path: root/bin/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-07-20 17:17:15 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-07-20 17:17:15 +0000
commiteff60cfe6dcdfc45fc4e3d9fc158becaaf390efc (patch)
treeca468dcf09ae8985656811017e1d48c8f164dd24 /bin/rbot
parent6a2e8cb6f631cf73031843eea3405e4bb21fc0c2 (diff)
Add --background option to daemonize the bot
Diffstat (limited to 'bin/rbot')
-rwxr-xr-xbin/rbot7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/rbot b/bin/rbot
index 14b57d7c..812c44f5 100755
--- a/bin/rbot
+++ b/bin/rbot
@@ -36,12 +36,16 @@ opts = GetoptLong.new(
["--debug", "-d", GetoptLong::NO_ARGUMENT],
["--help", "-h", GetoptLong::NO_ARGUMENT],
["--trace", "-t", GetoptLong::REQUIRED_ARGUMENT],
- ["--version", "-v", GetoptLong::NO_ARGUMENT]
+ ["--version", "-v", GetoptLong::NO_ARGUMENT],
+ ["--background", "-b", GetoptLong::NO_ARGUMENT]
)
$debug = false
+$daemonize = false
+
opts.each {|opt, arg|
$debug = true if(opt == "--debug")
+ $daemonize = true if(opt == "--background")
$opts[opt.sub(/^-+/, "")] = arg
}
@@ -79,6 +83,7 @@ if ($opts["help"])
puts " -h, --help this message"
puts " -v, --version version information"
puts " -d, --debug enable debug messages"
+ puts " -b, --background background (daemonize) the bot"
puts "config directory defaults to ~/.rbot"
exit 0
end