Compare commits

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