Add -v --version command line param to zmdc.pl
This commit is contained in:
parent
76d0dfa475
commit
94e0ec542a
|
@ -78,7 +78,7 @@ sub Usage
|
||||||
Usage: zmdc.pl <command> [daemon [options]]
|
Usage: zmdc.pl <command> [daemon [options]]
|
||||||
Parameters are :-
|
Parameters are :-
|
||||||
<command> - One of 'startup|shutdown|status|check|logrot' or
|
<command> - One of 'startup|shutdown|status|check|logrot' or
|
||||||
'start|stop|restart|reload'.
|
'start|stop|restart|reload|version'.
|
||||||
[daemon [options]] - Daemon name and options, required for second group of commands
|
[daemon [options]] - Daemon name and options, required for second group of commands
|
||||||
");
|
");
|
||||||
exit( -1 );
|
exit( -1 );
|
||||||
|
@ -90,7 +90,11 @@ if( !$command )
|
||||||
print( STDERR "No command given\n" );
|
print( STDERR "No command given\n" );
|
||||||
Usage();
|
Usage();
|
||||||
}
|
}
|
||||||
my $needs_daemon = $command !~ /(?:startup|shutdown|status|check|logrot)/;
|
if ( $command eq 'version' ) {
|
||||||
|
print ZoneMinder::Base::ZM_VERSION."\n";
|
||||||
|
exit( 0 );
|
||||||
|
}
|
||||||
|
my $needs_daemon = $command !~ /(?:startup|shutdown|status|check|logrot|version)/;
|
||||||
my $daemon = shift( @ARGV );
|
my $daemon = shift( @ARGV );
|
||||||
if( $needs_daemon && !$daemon )
|
if( $needs_daemon && !$daemon )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue