HUP -> Reload.

This commit is contained in:
SymKat 2012-09-03 13:50:09 -07:00
parent afc8978b78
commit 49e76c666b

View file

@ -352,6 +352,18 @@ sub do_status {
}
}
sub do_reload {
my ( $self ) = @_;
$self->read_pid;
if ( $self->pid && $self->pid_running ) {
kill "SIGHUP", $self->pid;
$self->pretty_print( "Reloaded" );
} else {
$self->pretty_print( "Not Running", "red" );
}
}
sub do_get_init_file {
shift->dump_init_script;
}
@ -422,7 +434,7 @@ sub run {
if ( $self->can($action) ) {
$self->$action;
} elsif ( ! $called_with ) {
die "Must be called with an action [start|stop|restart|status|show_warnings]";
die "Must be called with an action [start|stop|restart|reload|status|show_warnings]";
} else {
die "Error: undefined action $called_with";
}
@ -738,6 +750,13 @@ Called by:
/usr/bin/my_program_launcher.pl restart
=head2 do_reload
Is called when reload is given as an argument. Sends a HUP signal to the
daemon.
/usr/bin/my_program_launcher.pl reload
=head2 do_status
Is called when status is given as an argument. Displays the status of the