Index: branches/ccl_branches/ipponly-20191108/ippScripts/scripts/addstar_run.pl
===================================================================
--- branches/ccl_branches/ipponly-20191108/ippScripts/scripts/addstar_run.pl	(revision 41105)
+++ branches/ccl_branches/ipponly-20191108/ippScripts/scripts/addstar_run.pl	(revision 41211)
@@ -44,6 +44,7 @@
 my $minidvodb_path;
 
-my ( $add_id, $camera, $stage, $stage_id, $stage_extra1, $outroot, $stageroot, $dbname, $reduction, $dvodb, $minidvodb, $minidvodb_name, $minidvodb_group, $image_only, $verbose, $no_update,
-     $no_op, $redirect, $save_temps);
+my ( $add_id, $camera, $stage, $stage_id, $stage_extra1, $outroot, $stageroot, $dbname, $reduction, 
+     $dvodb, $minidvodb, $minidvodb_name, $minidvodb_group, $minidvodb_host, $image_only, $verbose, 
+     $no_update, $no_op, $redirect, $save_temps, $dvodbhost);
 GetOptions(
     'add_id=s'          => \$add_id, # Camtool identifier
@@ -66,9 +67,10 @@
     'redirect-output'   => \$redirect,
     'save-temps'        => \$save_temps, # Save temporary files?
+    'dvodbhost|w=s' => \$dvodbhost, # miniDVO database group
     ) or pod2usage( 2 );
 
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
 pod2usage(
-          -msg => "Required options: --add_id --camera --outroot --dvodb --stageroot --stage --dbname",
+          -msg => "Required options: --add_id --camera --outroot --dvodb --stageroot --stage --dbname --dvodbhost",
           -exitval => 3,
           ) unless
@@ -79,4 +81,5 @@
     defined $dvodb and
     defined $dbname and
+    defined $dvodbhost and
     defined $camera;
 if ($stage =~ /cam/ && !defined $stage_id) {
@@ -297,4 +300,5 @@
 	$minidvodb_path = $comp->{minidvodb_path};
 	$minidvodb_name = $comp->{minidvodb_name};
+	$minidvodb_host = $comp->{minidvodb_host};
 	
 	if (!defined($minidvodb_path)) {
@@ -422,4 +426,5 @@
 $fpaCommand .= " -dvodb_path $minidvodb_path" if defined $minidvodb_path;
 $fpaCommand .= " -minidvodb_name $minidvodb_name" if defined $minidvodb_name;
+$fpaCommand .= " -minidvodb_host $dvodbhost" if defined $dvodbhost;
 $fpaCommand .= " -dbname $dbname" if defined $dbname;
 
@@ -458,5 +463,6 @@
         $command .= " -path_base $outroot" if defined $outroot;
         $command .= (" -dtime_addstar " . ((DateTime->now->mjd - $mjd_start) * 86400));
-   #     $command .= " -minidvodb_name $minidvodb_name" if defined $minidvodb_name; don't think we want it recorded (not sure)
+        $command .= " -minidvodb_name $minidvodb_name" if defined $minidvodb_name; # dont think we want it recorded (not sure)
+        $command .= " -minidvodb_host $dvodbhost" if defined $dvodbhost; # dont think we want it recorded (not sure)
 	$command .= " -stage_extra1 $stage_extra1" if defined $stage_extra1;
         $command .= " -dbname $dbname" if defined $dbname;
Index: branches/ccl_branches/ipponly-20191108/ippScripts/scripts/minidvodb_createdb.pl
===================================================================
--- branches/ccl_branches/ipponly-20191108/ippScripts/scripts/minidvodb_createdb.pl	(revision 41105)
+++ branches/ccl_branches/ipponly-20191108/ippScripts/scripts/minidvodb_createdb.pl	(revision 41211)
@@ -15,5 +15,4 @@
 print "Starting script $0 on $host at $date\n\n";
 
-
 my $mjd_start = DateTime->now->mjd;   # MJD of starting script
 
@@ -39,20 +38,21 @@
 }
 
-my (  $outroot, $dbname, $dvodb, $minidvodb,$minidvodb_interval, $minidvodb_nums, $minidvodb_group, $camera,  $verbose, $no_update,
+my (  $outroot, $dbname, $dvodb, $minidvodb,$minidvodb_interval, $minidvodb_nums, $minidvodb_group, $minidvodb_host, $camera,  $verbose, $no_update,
      $no_op, $redirect, $save_temps);
 GetOptions(
-    'camera|c=s'        => \$camera, # Camera
-    'dbname|d=s'        => \$dbname, # Database name
-    'minidvodb_group|w=s'       => \$minidvodb_group, # minidvodb_group.
-    'outroot|w=s'       => \$outroot, # output file base name
-    'dvodb|w=s'         => \$dvodb,  # output DVO database
-    'minidvodb|w=s'     => \$minidvodb, # output miniDVODB
-    'interval|w=s'      => \$minidvodb_interval, #interval between creation of minidvodbs (default = 1day)
-    'num|w=s'      => \$minidvodb_nums, #interval between creation of minidvodbs (default = 500 addRuns)
-    'verbose'           => \$verbose,   # Print to stdout
-    'no-update'         => \$no_update, # Update the database?
-    'no-op'             => \$no_op, # Don't do any operations?
-    'redirect-output'   => \$redirect,
-    'save-temps'        => \$save_temps, # Save temporary files?
+    'camera|c=s'          => \$camera, # Camera
+    'dbname|d=s'          => \$dbname, # Database name
+    'minidvodb_group|w=s' => \$minidvodb_group, # minidvodb_group.
+    'outroot|w=s'         => \$outroot, # output file base name
+    'dvodb|w=s'           => \$dvodb,  # output DVO database
+    'minidvodb|w=s'       => \$minidvodb, # output miniDVODB
+    'interval|w=s'        => \$minidvodb_interval, #interval between creation of minidvodbs (default = 1day)
+    'num|w=s'             => \$minidvodb_nums, #interval between creation of minidvodbs (default = 500 addRuns)
+    'minidvodb_host|w=s'  => \$minidvodb_host, #assign a hostname for addstar
+    'verbose'             => \$verbose,   # Print to stdout
+    'no-update'           => \$no_update, # Update the database?
+    'no-op'               => \$no_op, # Don't do any operations?
+    'redirect-output'     => \$redirect,
+    'save-temps'          => \$save_temps, # Save temporary files?
     ) or pod2usage( 2 );
 
@@ -119,6 +119,4 @@
 unless ($no_op) {
 
-
-
 #see if there is already one in new state
     my $fpaCommand1 = "$addtool -listminidvodbrun";
@@ -127,10 +125,7 @@
     $fpaCommand1 .= " -dbname $dbname" if defined $dbname;
 
-
 unless ($no_update) {
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $fpaCommand1, verbose => $verbose);
-
-
 
    unless ($success) {
@@ -164,5 +159,5 @@
     &my_die( "Unable to get listminidvodbrun",$minidvodb_group, $PS_EXIT_SYS_ERROR) unless $success2;
   # if it didn't list something in active state (what?) then we definitely need to create a new one
-    if (defined(@$stdout_buf2)) {
+    if ((@$stdout_buf2)) {
   my  $metadata2 = $mdcParser->parse(join "", @$stdout_buf2) or
         &my_die("Unable to parse metadata config", $minidvodb_group, $PS_EXIT_PROG_ERROR);
@@ -194,7 +189,7 @@
 my ( $success3, $error_code3, $full_buf3, $stdout_buf3, $stderr_buf3 ) =
         run(command => $fpaCommand3, verbose => $verbose);
-    &my_die( "Unable to get checkminidvodbunaddrun", $minidvodb_group, $PS_EXIT_SYS_ERROR) unless $success3;
-
-    if (defined(@$stdout_buf3)) {  #checkminidvodb returns nothing IF there have been no addruns added to the db yet
+    &my_die( "Unable to get checkminidvodbrunaddrun", $minidvodb_group, $PS_EXIT_SYS_ERROR) unless $success3;
+
+    if ((@$stdout_buf3)) {  #checkminidvodb returns nothing IF there have been no addruns added to the db yet
     my  $metadata3 = $mdcParser->parse(join "", @$stdout_buf3) or
         &my_die("Unable to parse metadata config", $minidvodb_group, $PS_EXIT_PROG_ERROR);
@@ -229,4 +224,5 @@
     my $fpaCommand = "$addtool -addminidvodbrun";
     $fpaCommand .= " -set_minidvodb_group $minidvodb_group";
+    $fpaCommand .= " -set_minidvodb_host $minidvodb_host";
     $fpaCommand .= " -set_minidvodb_path  $minidvodbReal" if defined $minidvodbReal;
     $fpaCommand .= " -dbname $dbname" if defined $dbname;
