| 1 | package Clustericious::Command::daemon; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | use base qw( Clustericious::Command ); | ||
| 6 | use Mojolicious::Command::daemon; | ||
| 7 | |||
| 8 | # ABSTRACT: Clustericious command to stat nginx | ||
| 9 | our $VERSION = '1.29'; # VERSION | ||
| 10 | |||
| 11 | |||
| 12 | sub description { Mojolicious::Command::daemon->new->description }; | ||
| 13 | sub usage { Mojolicious::Command::daemon->new->usage }; | ||
| 14 | |||
| 15 | sub run | ||
| 16 | { | ||
| 17 | my($self, @args) = @_; | ||
| 18 | |||
| 19 | if(!grep /^-l/, @args) | ||
| 20 | { | ||
| 21 | if(my $url = $self->app->config->{url}) | ||
| 22 | { | ||
| 23 | unshift @args, -l => $url; | ||
| 24 | } | ||
| 25 | } | ||
| 26 | |||
| 27 | Mojolicious::Command::daemon::run($self, @args); | ||
| 28 | } | ||
| 29 | |||
| 30 | 1; | ||
| 31 | |||
| 32 | __END__ |