Skip to content

Commit

Permalink
Fixed deletion of old cron jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
christianTF committed Mar 6, 2018
1 parent a0b35a4 commit 55e15cf
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,27 @@ if [ ! -e REPLACELBPLOGDIR ]; then
mkdir -p REPLACELBPLOGDIR
fi

if [ -e "$LBHOMEDIR/system/cron/cron.daily/$2*" ]; then
rm $LBHOMEDIR/system/cron/cron.daily/$2* >/dev/null
if [ $? -eq 0 ]; then
echo "<WARNING> Deleting old daily schedules"
rm -f $LBHOMEDIR/system/cron/cron.daily/$2*
UPGRADE=1
fi
if [ -e "$LBHOMEDIR/system/cron/cron.weekly/$2*" ]; then

rm -f $LBHOMEDIR/system/cron/cron.weekly/$2*
if [ $? -eq 0 ]; then
echo "<WARNING> Deleting old weekly schedules"
rm -f $LBHOMEDIR/system/cron/cron.weekly/$2*
UPGRADE=1
fi
if [ -e "$LBHOMEDIR/system/cron/cron.monthly/$2*" ]; then

rm -f $LBHOMEDIR/system/cron/cron.monthly/$2*
if [ $? -eq 0 ]; then
echo "<WARNING> Deleting old monthly schedules"
rm -f $LBHOMEDIR/system/cron/cron.monthly/$2*
UPGRADE=1
fi
if [ -e "$LBHOMEDIR/system/cron/cron.yearly/$2*" ]; then

rm -f $LBHOMEDIR/system/cron/cron.yearly/$2*
if [ $? -eq 0 ]; then
echo "<WARNING> Deleting old yearly schedules ($LBHOMEDIR/system/cron/cron.yearly/$2*) "
rm -f $LBHOMEDIR/system/cron/cron.yearly/$2*
UPGRADE=1
fi

Expand Down

0 comments on commit 55e15cf

Please sign in to comment.