commit 4dfd330498d51de091149623cfe529a9fc5380cf
parent f9ec4a12766fbaeea689b536e00787e39fbcbc14
Author: Nicolas Pouillard <nicolas.pouillard@gmail.com>
Date: Tue, 19 Feb 2008 11:17:59 +0100
add a startup hook
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/bin/sup b/bin/sup
@@ -39,6 +39,12 @@ EOS
opt :compose, "Compose message to this recipient upon startup", :type => String
end
+Redwood::HookManager.register "startup", <<EOS
+Executes at startup
+No variables.
+No return value.
+EOS
+
if $opts[:list_hooks]
Redwood::HookManager.print_hooks
exit
@@ -128,6 +134,8 @@ begin
Index.add_source SentManager.new_source
end
+ HookManager.run "startup"
+
log "starting curses"
start_cursing