Skip to content

Commit

Permalink
Add 2 Second Delay and Print Log Message to Restart Command
Browse files Browse the repository at this point in the history
Allows for the web interface to at least see that the command was successfully sent, before the http server goes offline.
  • Loading branch information
krkeegan committed Nov 20, 2013
1 parent 9fa554b commit 9a67a73
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion code/common/mh_control.pl
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,13 @@ ()
$v_restart_mh->set_info( 'Restarts Misterhouse. This will only work if ' .
'you start with mh/bin/mhl') if !$OS_win;
$v_restart_mh->set_info('Restarts Misterhouse.') if $OS_win;
$v_restart_mh->tie_event('&exit_pgm(1)'); # noloop
$v_restart_mh->tie_event('&restart_mh()'); # noloop

sub restart_mh{
$exit_timer = new Timer;
print_log "MisterHouse will restart in 2 seconds.";
$exit_timer->set(2, '&exit_pgm(1)');
}

# This will be abend.
# Allow for no msg on first time use where this flag is not set yet.
Expand Down

0 comments on commit 9a67a73

Please sign in to comment.