cronie: add rc.d script and some config files.
--HG-- extra : convert_revision : 5ddf685027b96d674702810d45cada1c04701828
This commit is contained in:
16
templates/cronie/files/crond
Normal file
16
templates/cronie/files/crond
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
|
||||
# PROVIDE: crond
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
|
||||
$_rc_subr_loaded . /etc/rc.subr
|
||||
|
||||
name="crond"
|
||||
rcvar=$name
|
||||
command="/usr/sbin/${name}"
|
||||
pidfile="/var/run/${name}.pid"
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
||||
10
templates/cronie/files/crontab
Normal file
10
templates/cronie/files/crontab
Normal file
@@ -0,0 +1,10 @@
|
||||
SHELL=/bin/sh
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
MAILTO=
|
||||
HOME=/
|
||||
|
||||
# run-parts
|
||||
01 * * * * root run-parts /etc/cron.hourly
|
||||
02 4 * * * root run-parts /etc/cron.daily
|
||||
22 4 * * 0 root run-parts /etc/cron.weekly
|
||||
42 4 1 * * root run-parts /etc/cron.monthly
|
||||
14
templates/cronie/files/makewhatis.cron
Normal file
14
templates/cronie/files/makewhatis.cron
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
LOCKFILE=/var/lock/makewhatis.lock
|
||||
|
||||
# the lockfile is not meant to be perfect, it's just in case the
|
||||
# two makewhatis cron scripts get run close to each other to keep
|
||||
# them from stepping on each other's toes. The worst that will
|
||||
# happen is that they will temporarily corrupt the database...
|
||||
[ -f $LOCKFILE ] && exit 0
|
||||
|
||||
trap "{ rm -f $LOCKFILE ; exit 255; }" EXIT
|
||||
touch $LOCKFILE
|
||||
makewhatis -u -w
|
||||
exit 0
|
||||
5
templates/cronie/files/mlocate.cron
Normal file
5
templates/cronie/files/mlocate.cron
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
nodevs=$(< /proc/filesystems awk '$1 == "nodev" { print $2 }')
|
||||
renice +19 -p $$ >/dev/null 2>&1
|
||||
ionice -c2 -n7 -p $$ >/dev/null 2>&1
|
||||
/usr/bin/updatedb -f "$nodevs"
|
||||
Reference in New Issue
Block a user