package Cpanel::ServiceManager::Services::Cpanel_dovecot_solr;

# cpanel - Cpanel/ServiceManager/Services/Cpanel_dovecot_solr.pm
#                                                    Copyright 2016 cPanel, Inc.
#                                                           All rights Reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

use strict;
use warnings;

use parent 'Cpanel::ServiceManager::Base';

use lib qw( /var/cpanel/perl );

use Cpanel::Dovecot::Solr::Utils ();

sub pidfile         { return '/home/cpanelsolr/bin/solr-8984.pid' }
sub service_package { return ['cpanel-dovecot-solr'] }
sub ports           { return [8984] }
sub support_reload  { return 1; }
sub is_enabled      { return 1; }
sub is_configured   { return 1; }
sub service_binary  { return '/home/cpanelsolr/bin/solr' }

sub check {
    my ($self) = @_;

    # Should throw an exception on invalid
    $self->SUPER::check();

    Cpanel::Dovecot::Solr::Utils::check_for_library_boot_path();

    return 1;
}

1;
