Files
setup-php/src/scripts/ext/gearman.sh
2021-04-19 07:11:32 +05:30

23 lines
643 B
Bash

# Helper function to add gearman extension.
add_gearman_helper() {
add_ppa ondrej/pkg-gearman
sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y libgearman-dev
enable_extension gearman extension
if ! check_extension gearman; then
status="Installed and enabled"
sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"${version:?}"-gearman || pecl_install gearman
enable_extension gearman extension
fi
}
# Function to add gearman extension.
add_gearman() {
status="Enabled"
add_gearman_helper >/dev/null 2>&1
if check_extension gearman; then
add_log "${tick:?}" "gearman" "$status"
fi
}
add_gearman