From 8f180a95fe231b4421ba06d7b0cce06d4bb5e741 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 21 Nov 2017 13:35:11 +0100 Subject: [PATCH 1/2] DietPi-Software | Redis: Minor un/installation and activation fixes of PHP module - Auto installation of PHP module, if PHP stack is installed. Just do this, if PHP state is already installed+configured, otherwise this leads to dependency PHP installations. If PHP install state == 1, then redis module will be installed together with PHP already. - Correctly use the phpenmod command to activate the PHP module. Otherwise this command will show errors later, I even got empty .ini files, leading to inactive module. - Uninstall PHP module together with redis-server. --- dietpi/dietpi-software | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 7dd02d7220..4dfe027738 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -3795,6 +3795,12 @@ _EOF_ Banner_Installing AGI redis-server + #Redis php module | == 2 to check for existing installs, if == 1, then module will be installed together with PHP, to prevent dependency installations + if (( ${aSOFTWARE_INSTALL_STATE[89]} == 2 )); then + + AGI "$PHP_APT_PACKAGE_NAME"-redis + + fi fi @@ -8979,8 +8985,7 @@ _EOF_ if (( ${aSOFTWARE_INSTALL_STATE[$INSTALLING_INDEX]} == 1 )); then #Enable resdis extensions for all webstacks: - echo -e "extension=redis.so" > "$FP_PHP_BASE_DIR"/cli/conf.d/20-redis.ini &> /dev/null - echo -e "extension=redis.so" > "$FP_PHP_BASE_DIR"/apache2/conf.d/20-redis.ini &> /dev/null + "$PHP_APT_PACKAGE_NAME"enmod redis fi @@ -13052,7 +13057,7 @@ _EOF_ elif (( $1 == 91 )); then - AGP redis-server + AGP redis-server "$PHP_APT_PACKAGE_NAME"-redis elif (( $1 == 89 )); then From 7133bf7b2a1ca70f9db31ed94cea65df53177c8b Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 21 Nov 2017 22:18:26 +0100 Subject: [PATCH 2/2] tiny typo --- dietpi/dietpi-software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 4dfe027738..6dc9c38208 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -8984,7 +8984,7 @@ _EOF_ INSTALLING_INDEX=91 if (( ${aSOFTWARE_INSTALL_STATE[$INSTALLING_INDEX]} == 1 )); then - #Enable resdis extensions for all webstacks: + #Enable redis extension for all webstacks: "$PHP_APT_PACKAGE_NAME"enmod redis fi