Skip to content

Commit

Permalink
fixed setup log getting overwritten
Browse files Browse the repository at this point in the history
  • Loading branch information
mbhangui committed May 5, 2023
1 parent 0468a01 commit 1f2f4b3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions indimail-x/indimail.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -895,14 +895,18 @@ fi
%pretrans
argv1=$1

# stop indimail services before upgrade
(
echo "===== Start %{name} installation ====="
date
if [ -d /run ] ; then
rundir=/run/svscan
elif [ -d /var/run ] ; then
rundir=/var/run/svscan
else
rundir=%{servicedir}
fi
# stop indimail services before upgrade
echo "shutting down %{name} services"
for i in mrtg mysql.3306 indisrvr.4000 inlookup.infifo \
qmail-poppass.106
do
Expand Down Expand Up @@ -935,11 +939,10 @@ fi

# initialize setup log file
if [ -f %{libexecdir}/iupgrade.sh ] ; then
(
echo "Running Custom Installation Script for pretrans"
/bin/sh %{libexecdir}/iupgrade.sh pretrans noargs %{version} $*
) > /var/log/indimail-setup.log 2>&1
fi
) >> /var/log/indimail-setup.log 2>&1

### SCRIPTLET ###############################################################################
%pre
Expand Down Expand Up @@ -1259,7 +1262,7 @@ if [ -x %{mysqlPrefix}/libexec/mysqld -o -x %{mysqlPrefix}/sbin/mysqld -o -x %{m
error=1
fi
if [ $error -gt 0 ] ; then
echo "Disabling mysqld service"
echo "WARNING!!! error encountered creating MySQL db. Disabling mysqld service"
touch %{servicedir}/mysql.3306/down
fi
else
Expand Down

0 comments on commit 1f2f4b3

Please sign in to comment.