# chkout_service($how_handle, $title, $message)
# $how_handle means $config{iferror_services} options: stop, warn, browse
sub chkout_service
{
       if ( "$_[0]" eq "stop" ) {
             return if ( "$_[2]" eq "" || "$_[2]" eq "unknown" );
             &additional_log("STTA $_[0]", undef, "$_[2]");
             &webmin_log("STTA $text{$_[0]}",undef,"$_[1]");
             die "STTA $text{$_[0]}: $_[1] \n $_[2] \n";
       } elsif ( "$_[0]" eq "warn" ) {
             return if ( "$_[2]" eq "" );
             print "STTA $text{$_[0]}: $_[1] \n $_[2] \n";
             # out a message
       } elsif ( "$_[0]" eq "browse" ) {
             # turn off all acls ...
             &additional_log("STTA $_[0]", undef, "$_[2]");
             &webmin_log("STTA $text{$_[0]}",undef,"$_[1]");
       } else {
             if ( "$_[2]" eq "" ) {
                   print "STTA:  $_[1]} $text{OK} \n";
             } else {
                  if ( "$_[2]" ne "unknown" ) {
                      print "STTA $text{$_[0]}: $_[1] \n $_[2] \n";
                  } else {
                      print "STTA $text{$_[0]}: $_[1] \n $text{unknown} \n";
                  }
             }
       }
}
