#! /bin/sh
#------------------------------------------------------------------------------
# /tmp/preinstall.sh - preinstall script for postgresql18
#
# Creation   :  2024-01-28 dv
# Last Update:  2025-12-16 17:51:20
#
# Copyright (c) 2025 the eisfair team, team(at)eisfair(dot)org
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#------------------------------------------------------------------------------

# set package name
package_name=postgresql18

# ---------------------------------------------------------------------------
# remove old cron job
# ---------------------------------------------------------------------------
if [ -f "/var/cron/etc/root/${package_name}" ] && \
   [ -f "/var/install/config.d/cron" ]
then
    rm -f "/var/cron/etc/root/${package_name}"
    /var/install/config.d/cron > /dev/null 2> /dev/null
fi

exit 0

# ---------------------------------------------------------------------------
# end
# ---------------------------------------------------------------------------
