
#
# Check for correct password.
#

$TOKEN    = $ARGV[0];
$PASSWORD = $ARGV[1];

$DIR = "$ENV{SERVER_ADMI_SOLVERS}/$TOKEN";

if (-d "$DIR") {
  if (-s "$DIR/PASSWORD") {
    $PASS = `cat $DIR/PASSWORD`;
    $PASS =~ s/\n//;
    unless ($PASSWORD eq $PASS) {
      exit 1;
    }
  }
}
