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