system/fcron: Update script.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Richard Narron 2024-03-01 21:29:39 +07:00 committed by Willy Sudiarto Raharjo
parent 02c7eabf53
commit 8822594583
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
1 changed files with 16 additions and 15 deletions

View File

@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=fcron
VERSION=${VERSION:-3.3.1}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -34,20 +34,6 @@ PKGTYPE=${PKGTYPE:-tgz}
FCRON_USER=${FCRON_USER:-fcron}
FCRON_GROUP=${FCRON_GROUP:-fcron}
if ! getent group $FCRON_GROUP >/dev/null; then
echo "Error, the group $FCRON_GROUP does not exist."
echo "Create the group and user like this:"
echo " groupadd -g 289 $FCRON_GROUP"
echo " useradd -u 289 -g $FCRON_GROUP -d /var/spool/fcron -M -s /bin/false $FCRON_USER"
exit 1
fi
if ! getent passwd $FCRON_USER >/dev/null; then
echo "Error, the userid $FCRON_USER does not exist."
echo "Create the user like this:"
echo " useradd -u 289 -g $FCRON_GROUP -d /var/spool/fcron -M -s /bin/false $FCRON_USER"
exit 1
fi
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
@ -64,6 +50,21 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
exit 0
fi
# Make sure the fcron default user and group exist
if ! getent group $FCRON_GROUP >/dev/null; then
echo "Error, the group $FCRON_GROUP does not exist."
echo "Create the group and user like this:"
echo " groupadd -g 289 $FCRON_GROUP"
echo " useradd -u 289 -g $FCRON_GROUP -d /var/spool/fcron -M -s /bin/false $FCRON_USER"
exit 1
fi
if ! getent passwd $FCRON_USER >/dev/null; then
echo "Error, the userid $FCRON_USER does not exist."
echo "Create the user like this:"
echo " useradd -u 289 -g $FCRON_GROUP -d /var/spool/fcron -M -s /bin/false $FCRON_USER"
exit 1
fi
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}