Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISPConfig
ISPConfig Autoinstaller
Commits
28f39d67
Commit
28f39d67
authored
Feb 23, 2021
by
Thom Pol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only run update-alternatives for php-fpm.sock when multiple PHP version are installed (
#30
)
parent
e191f672
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
4 deletions
+24
-4
lib/os/class.ISPConfigDebian10OS.inc.php
lib/os/class.ISPConfigDebian10OS.inc.php
+6
-1
lib/os/class.ISPConfigDebianOS.inc.php
lib/os/class.ISPConfigDebianOS.inc.php
+6
-1
lib/os/class.ISPConfigUbuntu2004OS.inc.php
lib/os/class.ISPConfigUbuntu2004OS.inc.php
+6
-1
lib/os/class.ISPConfigUbuntuOS.inc.php
lib/os/class.ISPConfigUbuntuOS.inc.php
+6
-1
No files found.
lib/os/class.ISPConfigDebian10OS.inc.php
View file @
28f39d67
...
...
@@ -57,7 +57,12 @@ class ISPConfigDebian10OS extends ISPConfigDebianOS {
}
if
(
ISPConfig
::
shallInstall
(
'web'
))
{
$cmd
=
'update-alternatives --set php-cgi /usr/bin/php-cgi7.3 ; update-alternatives --set php-fpm.sock /run/php/php7.3-fpm.sock'
;
// When --use-php-system is used, there is no alternative for php-fpm.sock.
if
(
ISPConfig
::
wantsPHP
()
===
'system'
)
{
$cmd
=
'update-alternatives --set php-cgi /usr/bin/php-cgi7.3'
;
}
else
{
$cmd
=
'update-alternatives --set php-cgi /usr/bin/php-cgi7.3 ; update-alternatives --set php-fpm.sock /run/php/php7.3-fpm.sock'
;
}
$result
=
$this
->
exec
(
$cmd
);
if
(
$result
===
false
)
{
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
...
...
lib/os/class.ISPConfigDebianOS.inc.php
View file @
28f39d67
...
...
@@ -182,7 +182,12 @@ class ISPConfigDebianOS extends ISPConfigBaseOS {
}
if
(
ISPConfig
::
shallInstall
(
'web'
))
{
$cmd
=
'update-alternatives --set php-cgi /usr/bin/php-cgi7.0 ; update-alternatives --set php-fpm.sock /run/php/php7.0-fpm.sock'
;
// When --use-php-system is used, there is no alternative for php-fpm.sock.
if
(
ISPConfig
::
wantsPHP
()
===
'system'
)
{
$cmd
=
'update-alternatives --set php-cgi /usr/bin/php-cgi7.0'
;
}
else
{
$cmd
=
'update-alternatives --set php-cgi /usr/bin/php-cgi7.0 ; update-alternatives --set php-fpm.sock /run/php/php7.0-fpm.sock'
;
}
$result
=
$this
->
exec
(
$cmd
);
if
(
$result
===
false
)
{
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
...
...
lib/os/class.ISPConfigUbuntu2004OS.inc.php
View file @
28f39d67
...
...
@@ -107,7 +107,12 @@ maxretry = 3';
}
if
(
ISPConfig
::
shallInstall
(
'web'
))
{
$cmd
=
'update-alternatives --set php-cgi /usr/bin/php-cgi7.4 ; update-alternatives --set php-fpm.sock /run/php/php7.4-fpm.sock'
;
// When --use-php-system is used, there is no alternative for php-fpm.sock.
if
(
ISPConfig
::
wantsPHP
()
===
'system'
)
{
$cmd
=
'update-alternatives --set php-cgi /usr/bin/php-cgi7.4'
;
}
else
{
$cmd
=
'update-alternatives --set php-cgi /usr/bin/php-cgi7.4 ; update-alternatives --set php-fpm.sock /run/php/php7.4-fpm.sock'
;
}
$result
=
$this
->
exec
(
$cmd
);
if
(
$result
===
false
)
{
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
...
...
lib/os/class.ISPConfigUbuntuOS.inc.php
View file @
28f39d67
...
...
@@ -90,7 +90,12 @@ maxretry = 3';
}
if
(
ISPConfig
::
shallInstall
(
'web'
))
{
$cmd
=
'update-alternatives --set php-cgi /usr/bin/php-cgi7.2 ; update-alternatives --set php-fpm.sock /run/php/php7.2-fpm.sock'
;
// When --use-php-system is used, there is no alternative for php-fpm.sock.
if
(
ISPConfig
::
wantsPHP
()
===
'system'
)
{
$cmd
=
'update-alternatives --set php-cgi /usr/bin/php-cgi7.2'
;
}
else
{
$cmd
=
'update-alternatives --set php-cgi /usr/bin/php-cgi7.2 ; update-alternatives --set php-fpm.sock /run/php/php7.2-fpm.sock'
;
}
$result
=
$this
->
exec
(
$cmd
);
if
(
$result
===
false
)
{
throw
new
ISPConfigOSException
(
'Command '
.
$cmd
.
' failed.'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment