X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FCommandLine.hs;h=b734d770b5dde0bcc9c6309254a746aaa60d5eda;hb=f6cb0ba712e06e52d080b86e9eba6c3585a7514b;hp=ad4f867363d75e3f1081167ff1f87201a0439d05;hpb=a37e06422eefce32514b38e3b44bb119250c4003;p=dead%2Fhtsn.git diff --git a/src/CommandLine.hs b/src/CommandLine.hs index ad4f867..b734d77 100644 --- a/src/CommandLine.hs +++ b/src/CommandLine.hs @@ -22,7 +22,6 @@ import Paths_htsn (version) import Data.Version (showVersion) import OptionalConfiguration ( OptionalConfiguration(..) ) -import TSN.FeedHosts ( FeedHosts(..) ) -- | The description of the program, displayed as part of the help. description :: String @@ -37,29 +36,45 @@ my_summary :: String my_summary = program_name ++ "-" ++ (showVersion version) +daemonize_help :: String +daemonize_help = + "Run as a daemon, in the background." + -- | A description of the "log_file" option. log_file_help :: String log_file_help = - "If syslog == False, log to the given file." + "Log to the given file." log_level_help :: String log_level_help = "How verbose should the logs be? One of INFO, WARNING, ERROR." +-- | A description of the "output_directory" option. +output_directory_help :: String +output_directory_help = + "Directory in which to output the XML files; must be writable" + -- | A description of the "password" option. password_help :: String password_help = "Password to use when connecting to the feed" --- | A description of the "output_directory" option. -output_directory_help :: String -output_directory_help = - "Directory in which to output the XML files; must be writable" +pidfile_help :: String +pidfile_help = + "Location to create PID file (daemon only)." + +run_as_group_help :: String +run_as_group_help = + "System group to run as (daemon only)." + +run_as_user_help :: String +run_as_user_help = + "System user to run under (daemon only)." -- | A description of the "syslog" option. syslog_help :: String syslog_help = - "Enable (default) or disable logging to syslog." + "Enable logging to syslog." -- | A description of the "username" option. username_help :: String @@ -75,13 +90,17 @@ arg_spec = -- Use an empty list for feed_hosts since cmdargs will appends to -- the default when the user supplies feed hosts. If he specifies -- any, those are all we should use. - feed_hosts = FeedHosts [] &= typ "HOSTNAMES" &= args, - log_file = def &= typFile &= help log_file_help, - log_level = def &= typ "LEVEL" &= help log_level_help, - password = def &= typ "PASSWORD" &= help password_help, - output_directory = def &= typDir &= help output_directory_help, - syslog = def &= typ "BOOL" &= help syslog_help, - username = def &= typ "USERNAME" &= help username_help } + daemonize = def &= typ "BOOL" &= help daemonize_help, + feed_hosts = def &= typ "HOSTNAMES" &= args, + log_file = def &= typFile &= help log_file_help, + log_level = def &= typ "LEVEL" &= help log_level_help, + output_directory = def &= typDir &= help output_directory_help, + password = def &= typ "PASSWORD" &= help password_help, + pidfile = def &= typFile &= help pidfile_help, + run_as_group = def &= typ "GROUP" &= help run_as_group_help, + run_as_user = def &= typ "USER" &= help run_as_user_help, + syslog = def &= typ "BOOL" &= help syslog_help, + username = def &= typ "USERNAME" &= help username_help } &= program program_name &= summary my_summary &= details [description]