mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 15:29:05 +00:00
Add Asterisk manpage
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
12
asterisk.c
12
asterisk.c
@@ -1410,10 +1410,17 @@ static void ast_remotecontrol(char * data)
|
||||
printf("\nDisconnected from Asterisk server\n");
|
||||
}
|
||||
|
||||
static int show_version(void)
|
||||
{
|
||||
printf("Asterisk " ASTERISK_VERSION "\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int show_cli_help(void) {
|
||||
printf("Asterisk " ASTERISK_VERSION ", Copyright (C) 2000-2004, Digium.\n");
|
||||
printf("Usage: asterisk [OPTIONS]\n");
|
||||
printf("Valid Options:\n");
|
||||
printf(" -V Display version number and exit\n");
|
||||
printf(" -C <configfile> Use an alternate configuration file\n");
|
||||
printf(" -G <group> Run as a group other than the caller\n");
|
||||
printf(" -U <user> Run as a user other than the caller\n");
|
||||
@@ -1533,7 +1540,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
*/
|
||||
/* Check for options */
|
||||
while((c=getopt(argc, argv, "hfdvqprRgcinx:U:G:C:")) != -1) {
|
||||
while((c=getopt(argc, argv, "hfdvVqprRgcinx:U:G:C:")) != -1) {
|
||||
switch(c) {
|
||||
case 'd':
|
||||
option_debug++;
|
||||
@@ -1585,6 +1592,9 @@ int main(int argc, char *argv[])
|
||||
case 'h':
|
||||
show_cli_help();
|
||||
exit(0);
|
||||
case 'V':
|
||||
show_version();
|
||||
exit(0);
|
||||
case 'U':
|
||||
runuser = optarg;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user