diff --git a/scripts/zmdc.pl.in b/scripts/zmdc.pl.in index 23cd02a2e..c209ae63f 100644 --- a/scripts/zmdc.pl.in +++ b/scripts/zmdc.pl.in @@ -78,7 +78,7 @@ sub Usage Usage: zmdc.pl [daemon [options]] Parameters are :- - 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 "); exit( -1 ); @@ -90,7 +90,11 @@ if( !$command ) print( STDERR "No command given\n" ); 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 ); if( $needs_daemon && !$daemon ) {