Lines 83-90
Link Here
|
83 |
echo ${ret} |
83 |
echo ${ret} |
84 |
} |
84 |
} |
85 |
|
85 |
|
86 |
apache2_link="${EROOT}"$(get_active_libdir)/apache2/modules/libphp5$(get_libname) |
|
|
87 |
|
88 |
cleanup() { |
86 |
cleanup() { |
89 |
local target=$(find_targets_$1 | tail -n 1) |
87 |
local target=$(find_targets_$1 | tail -n 1) |
90 |
[[ -z $target ]] && |
88 |
[[ -z $target ]] && |
Lines 107-112
Link Here
|
107 |
for target in $(find_targets); do |
105 |
for target in $(find_targets); do |
108 |
for libdir in $(get_libdirs); do |
106 |
for libdir in $(get_libdirs); do |
109 |
[[ -f ${EROOT}${libdir}/$target/apache2/libphp5$(get_libname) ]] && echo $target |
107 |
[[ -f ${EROOT}${libdir}/$target/apache2/libphp5$(get_libname) ]] && echo $target |
|
|
108 |
[[ -f ${EROOT}${libdir}/$target/apache2/libphp7$(get_libname) ]] && echo $target |
110 |
done |
109 |
done |
111 |
done | sort -u |
110 |
done | sort -u |
112 |
} |
111 |
} |
Lines 151-157
Link Here
|
151 |
} |
150 |
} |
152 |
|
151 |
|
153 |
get_active_apache2() { |
152 |
get_active_apache2() { |
154 |
readlink -e "${EROOT}"$(get_active_libdir)/apache2/modules/libphp5$(get_libname) | sed -ne "s:.*/usr/.*/\(php[0-9]\.[0-9]\)/apache2/libphp5$(get_libname):\1:p" |
153 |
if [[ -e "${EROOT}"$(get_active_libdir)/apache2/modules/libphp5$(get_libname) ]] ; then |
|
|
154 |
readlink -e "${EROOT}"$(get_active_libdir)/apache2/modules/libphp5$(get_libname) | sed -ne "s:.*/usr/.*/\(php[0-9]\.[0-9]\)/apache2/libphp5$(get_libname):\1:p" |
155 |
elif [[ -e "${EROOT}"$(get_active_libdir)/apache2/modules/libphp7$(get_libname) ]] ; then |
156 |
readlink -e "${EROOT}"$(get_active_libdir)/apache2/modules/libphp7$(get_libname) | sed -ne "s:.*/usr/.*/\(php[0-9]\.[0-9]\)/apache2/libphp7$(get_libname):\1:p" |
157 |
fi |
155 |
} |
158 |
} |
156 |
|
159 |
|
157 |
resolv_target() { |
160 |
resolv_target() { |
Lines 217-224
Link Here
|
217 |
local libdir t=$(resolv_target apache2 $1) |
220 |
local libdir t=$(resolv_target apache2 $1) |
218 |
[[ -z $t ]] && die -q "Bad target" |
221 |
[[ -z $t ]] && die -q "Bad target" |
219 |
for libdir in $(get_libdirs); do |
222 |
for libdir in $(get_libdirs); do |
220 |
ln -sf ../../$t/apache2/libphp5$(get_libname) "${EROOT}"${libdir}/apache2/modules/ || \ |
223 |
ln -sf ../../$t/apache2/libphp{$t:0:1}$(get_libname) "${EROOT}"${libdir}/apache2/modules/ || \ |
221 |
die -q "Failed to set symlink for ${EPREFIX}${libdir}/apache2/modules/libphp5$(get_libname)" |
224 |
die -q "Failed to set symlink for ${EPREFIX}${libdir}/apache2/modules/libphp${t:0:1}$(get_libname)" |
222 |
done |
225 |
done |
223 |
echo "You have to run \`${EPREFIX}/etc/init.d/apache2 restart' for the changes to take effect" |
226 |
echo "You have to run \`${EPREFIX}/etc/init.d/apache2 restart' for the changes to take effect" |
224 |
} |
227 |
} |