Imported Upstream version 2.7
[ossec-hids.git] / src / shared / help.c
1 /* @(#) $Id: ./src/shared/help.c, 2011/09/08 dcid Exp $
2  */
3
4 /* Copyright (C) 2009 Trend Micro Inc.
5  * All rights reserved.
6  *
7  * This program is a free software; you can redistribute it
8  * and/or modify it under the terms of the GNU General Public
9  * License (version 2) as published by the FSF - Free Software
10  * Foundation
11  */
12
13 /* Part of the OSSEC HIDS
14  * Available at http://www.ossec.net/hids/
15  */
16
17 /* Help Function
18  */
19
20
21 #include "shared.h"
22
23 void help(const char *prog)
24 {
25     print_out(" ");
26     print_out("%s %s - %s (%s)", __name, __version, __author, __contact);
27     print_out("%s", __site);
28     print_out(" ");
29     print_out("  %s: -[Vhdt] [-u user] [-g group] [-c config] [-D dir]", prog);
30     print_out("    -V          Version and license message");
31     print_out("    -h          This help message");
32     print_out("    -d          Execute in debug mode");
33     print_out("    -t          Test configuration");
34     print_out("    -f          Run in foreground");
35     print_out("    -u <user>   Run as 'user'");
36     print_out("    -g <group>  Run as 'group'");
37     print_out("    -c <config> Read the 'config' file");
38     print_out("    -D <dir>    Chroot to 'dir'");
39     print_out(" ");
40     exit(1);
41 }
42
43 void print_version()
44 {
45     print_out(" ");
46     print_out("%s %s - %s", __name, __version, __author);
47     print_out(" ");
48     print_out("%s",__license);
49     exit(1);
50 }
51
52 /* EOF */