Skip to content

Commit

Permalink
Check for /vagrant dir rather than hostname
Browse files Browse the repository at this point in the history
it's simpler and doesn't rely on an ambiguous hostname
  • Loading branch information
rwstauner committed Jun 5, 2014
1 parent 0290638 commit a3176ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/daemon-control.pl
Expand Up @@ -7,7 +7,6 @@

use Daemon::Control;
use File::Path 2.06 (); # core
use Sys::Hostname qw( hostname );

my $name = 'metacpan-www';
my $user = 'metacpan';
Expand All @@ -20,7 +19,8 @@
my $carton = '/usr/local/perlbrew/perls/perl-5.16.2/bin/carton';
my $workers = 7;

if ( hostname() eq 'debian' ) {
# If running in the development vm change the user to avoid permission problems.
if ( -d '/vagrant' ) {
$user = 'vagrant';
$workers = 3;
}
Expand Down

0 comments on commit a3176ce

Please sign in to comment.