Instead makes sure there's no socket conflict by simply prepending the PHP version to the socket nametags/0.0.1_0.fc26_el5
parent
bd62c565c0
commit
c1450e94f7
4 changed files with 17 additions and 54 deletions
@ -1,37 +0,0 @@ |
||||
#!/usr/bin/perl -w |
||||
|
||||
use strict; |
||||
use warnings; |
||||
use esmith::ConfigDB; |
||||
use esmith::util; |
||||
|
||||
my $c = esmith::ConfigDB->open_ro || die "Couldn't open the configuration database\n"; |
||||
my @fpms = qw( |
||||
php-fpm |
||||
php56-php-fpm |
||||
php70-php-fpm |
||||
php71-php-fpm |
||||
); |
||||
|
||||
# We need to ensure every versions are stopped, and only then start them all again |
||||
# so if we move a pool from one version to another, we won't have a socket conflict |
||||
|
||||
foreach my $fpm (@fpms){ |
||||
esmith::util::serviceControl( |
||||
NAME => $fpm, |
||||
ACTION => 'stop', |
||||
BACKGROUND => 'false') |
||||
or warn "Unable to stop $fpm\n"; |
||||
} |
||||
|
||||
foreach my $fpm (@fpms){ |
||||
my $service = $c->get($fpm); |
||||
if ($service && ($service->prop('status') || 'disabled') eq 'enabled'){ |
||||
esmith::util::serviceControl( |
||||
NAME => $fpm, |
||||
ACTION => 'start', |
||||
BACKGROUND => 'false') |
||||
or die "Unable to start $fpm\n"; |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue