system/fcron: Added sample.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
ed645e164f
commit
48e3666c67
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
PRGNAM=fcron
|
PRGNAM=fcron
|
||||||
VERSION=${VERSION:-3.2.0}
|
VERSION=${VERSION:-3.2.0}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-2}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
|
|
||||||
# Select fcron's default user/group
|
# Select fcron's default user/group
|
||||||
|
@ -20,7 +20,7 @@ if ! getent group $FCRON_GROUP >/dev/null; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if ! getent passwd $FCRON_USER >/dev/null; then
|
if ! getent passwd $FCRON_USER >/dev/null; then
|
||||||
echo "Error, the userid $FCRON_USER does not exist."
|
echo "Error, the userid $FCRON_USER does not exist."
|
||||||
echo "Create the user like this:"
|
echo "Create the user like this:"
|
||||||
echo " useradd -u 289 -g $FCRON_GROUP -d /var/spool/fcron -M -s /bin/false $FCRON_USER"
|
echo " useradd -u 289 -g $FCRON_GROUP -d /var/spool/fcron -M -s /bin/false $FCRON_USER"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -95,6 +95,7 @@ install -D -m 0644 $CWD/rc.fcron $PKG/etc/rc.d/rc.fcron.new
|
||||||
cp -a README $PKG/usr/doc/$PRGNAM-$VERSION
|
cp -a README $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
cp -a $CWD/README $PKG/usr/doc/$PRGNAM-$VERSION/README.slackware
|
cp -a $CWD/README $PKG/usr/doc/$PRGNAM-$VERSION/README.slackware
|
||||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||||
|
cp -a $CWD/sample-root-fcrontab.txt $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
|
|
||||||
mv $PKG/etc/fcron.conf $PKG/etc/fcron.conf.new
|
mv $PKG/etc/fcron.conf $PKG/etc/fcron.conf.new
|
||||||
mv $PKG/etc/fcron.deny $PKG/etc/fcron.deny.new
|
mv $PKG/etc/fcron.deny $PKG/etc/fcron.deny.new
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
# Run the hourly, daily, weekly, and monthly fcron jobs.
|
||||||
|
# Jobs that need different timing may be entered into the fcrontab as ,
|
||||||
|
# before, but most really don't need greater granularity than this. If
|
||||||
|
# the exact times of the hourly, daily, weekly, and monthly fcron jobs do
|
||||||
|
# not suit your needs, feel free to adjust them.
|
||||||
|
#
|
||||||
|
# set default for scripts to run if they did not run during down time
|
||||||
|
!bootrun(1)
|
||||||
|
#
|
||||||
|
# Run hourly fcron jobs at 47 minutes after the hour:
|
||||||
|
& 47 * * * * /usr/bin/run-parts /etc/cron.hourly 1>/dev/null 2>&1
|
||||||
|
#
|
||||||
|
# Run daily fcron jobs at 4:40 every day:
|
||||||
|
& 40 4 * * * /usr/bin/run-parts /etc/cron.daily 1>/dev/null 2>&1
|
||||||
|
#
|
||||||
|
# Run weekly fcron jobs at 4:30 on the first day of the week:
|
||||||
|
& 30 4 * * 0 /usr/bin/run-parts /etc/cron.weekly 1>/dev/null 2>&1
|
||||||
|
#
|
||||||
|
# Run monthly fcron jobs at 4:20 on the first day of the month:
|
||||||
|
& 20 4 1 * * /usr/bin/run-parts /etc/cron.monthly 1>/dev/null 2>&1
|
||||||
|
|
Loading…
Reference in New Issue