Compare commits

..
2 Commits
+38 -15
View File
@@ -181,7 +181,7 @@ systemd_supported=false
systemd=$(which systemd)
systemctl=$(which systemctl)
if [[ -n "$systemd" ]] && [[ -n "$systemctl" ]] ; then
if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then
systemd_supported=true
fi
@@ -973,13 +973,24 @@ else
error "$(cat $log_file)"
fi
echononl "\tRename the composer.json-dist file into composer.json"
cp -a "composer.json-dist" "composer.json" > $log_file 2>&1
if [[ $? -eq 0 ]]; then
echo_ok
#echononl "\tRename the composer.json-dist file into composer.json"
echononl "\tProvide the 'composer.json' file .."
if [[ ! -e "${WEBSITE_BASEDIR}/roundcubemail-${ROUNDCUBE_VERSION}/composer.json" ]] ; then
if [[ ! -e "${WEBSITE_BASEDIR}/roundcubemail-${ROUNDCUBE_VERSION}/composer.json-dist" ]] ; then
echo_failed
error "Neither the 'composer.json-dist' file nor the 'composer.json' file' exist"
else
cp -a "composer.json-dist" "composer.json" > $log_file 2>&1
if [[ $? -eq 0 ]]; then
echo_ok
else
echo_failed
error "$(cat $log_file)"
fi
fi
else
echo_failed
error "$(cat $log_file)"
echo_skipped
fi
echononl "\tInstall composer to ${WEBSITE_BASEDIR}/roundcubemail-${ROUNDCUBE_VERSION}"
@@ -1768,7 +1779,6 @@ echononl "\tRestart Apache Webservice.."
if [[ -n "$APACHE_SERVICE_FILE" ]] || [[ -n "$APACHE_INIT_SCRIPT" ]] ; then
if [[ -n "$APACHE_SERVICE_FILE" ]] ; then
systemctl restart $APACHE_SERVICE_FILE > $log_file 2>&1
echo "systemctl restart $APACHE_SERVICE_FILE > $log_file 2>&1"
else
$APACHE_INIT_SCRIPT restart > $log_file 2>&1
fi
@@ -2151,7 +2161,8 @@ fi
echononl "\tInstall needed debian packages.."
needed_packages_spell=""
declare -a needed_packages_spell_arr=()
_failed=false
_needed_packages_spell="
aspell-en
aspell-de
@@ -2164,21 +2175,33 @@ for _pkg in $_needed_packages_spell ; do
if aptitude search "$_pkg" | grep " $_pkg " | grep -e "^i" > /dev/null 2>&1 ; then
continue
else
needed_packages_spell="$needed_packages_spell $_pkg"
needed_packages_spell_arr+=("$_pkg")
fi
done
if [[ -n "$needed_packages_spell" ]]; then
DEBIAN_FRONTEND=noninteractive apt-get -y install $needed_packages_spell > /dev/null 2> "$log_file"
if [[ $? -eq 0 ]] ; then
echo_ok
else
> "$log_file"
if [[ ${#needed_packages_spell_arr[@]} -gt 0 ]]; then
for _pkg in ${needed_packages_spell_arr[@]} ; do
DEBIAN_FRONTEND=noninteractive apt-get -y install "$_pkg" >> "$log_file" 2>&1
if [[ $? -gt 0 ]] ; then
_failed=true
fi
done
if $_failed ; then
echo_failed
error "$(cat $log_file)"
else
echo_ok
fi
else
echo_skipped
fi
echononl "\tAdjust Roundcube Configuration for specclchecking"
cat <<EOF >>$WEBSITE_BASEDIR/roundcubemail-${ROUNDCUBE_VERSION}/config/config.inc.php 2> $log_file