#!/usr/bin/env perl

# Fake binary to do as little as possible to pass tests.
if($ARGV[0] eq '--help') {
    print <<"EOHELP";
This is the help screen for the faux activemq binary.

This does not contain the text needed to convince the system you need the
console flag, so it should not be used.

All it supports is --help, which prints this message, and console, which will
error, and --version, which lies about being ActiveMQ at a version number.

It is as small as shim as useful.
EOHELP
    exit 1;
}

if($ARGV[0] eq '--version') {
    print <<"EOVERSION";
This is a fake version of

ActiveMQ 5.1.9

Don't get too excited about it.
EOVERSION
    exit 0;
}

if($ARGV[0] eq 'console') {
    print <<"EOERROR";
This script can't handle the console command line, and produces screens of
junk and exits.  So this fails now.
EOERROR
    exit 1;
}

print <<"EORUNNING";
This script isn't going to do anything useful.  It's going to wait for nothing
to happen.

Press Control-C or otherwise signal it to end to get out.
EORUNNING
while(1) {
    sleep 3600;
}
exit 1; # Not reached.


