Skip to content

Commit

Permalink
Auto-determine FreeBSD package prefix from version
Browse files Browse the repository at this point in the history
If the php version has been set in globals, use it to determine the
default package prefix on FreeBSD.
This should be a compatible change, since the package prefix can still
be overridden, and has to match the selected version anyway.
  • Loading branch information
oxc committed Nov 4, 2019
1 parent c4af507 commit e727da0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions manifests/globals.pp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@
}
}
'FreeBSD': {
case $globals_php_version {
/^(\d)\.(\d)$/: {
$package_prefix = "php${1}${2}-"
}
default: {
$package_prefix = "php56-"
}
}
$default_config_root = '/usr/local/etc'
$default_fpm_pid_file = '/var/run/php-fpm.pid'
$fpm_service_name = undef
Expand Down
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
$fpm_group = 'www'
$embedded_package_suffix = 'embed'
$embedded_inifile = "${config_root}/php-embed.ini"
$package_prefix = 'php56-'
$package_prefix = $php::globals::package_prefix
$compiler_packages = ['gcc']
$manage_repos = false
$root_group = 'wheel'
Expand Down

0 comments on commit e727da0

Please sign in to comment.