Blame tests/p_cron/cron_crontab_daily_test.sh
|
Athmane Madjoudj |
4f8977 |
#!/bin/sh
|
|
Athmane Madjoudj |
4f8977 |
# Author: Athmane Madjoudj <athmanem@gmail.com>
|
|
Athmane Madjoudj |
4f8977 |
|
|
Athmane Madjoudj |
4f8977 |
t_Log "Running $0 - crontab test."
|
|
Athmane Madjoudj |
4f8977 |
|
|
Athmane Madjoudj |
dcd58c |
# Add a test cron
|
|
Athmane Madjoudj |
dcd58c |
cat > /etc/cron.daily/test.sh<
|
|
Athmane Madjoudj |
dcd58c |
#!/bin/sh
|
|
Athmane Madjoudj |
dcd58c |
echo 'test'
|
|
Athmane Madjoudj |
dcd58c |
EOF
|
|
Athmane Madjoudj |
dcd58c |
chmod +x /etc/cron.daily/test.sh
|
|
Athmane Madjoudj |
dcd58c |
|
|
Athmane Madjoudj |
dcd58c |
|
|
Athmane Madjoudj |
4f8977 |
run-parts /etc/cron.daily
|
|
Athmane Madjoudj |
4f8977 |
tail /var/log/cron | grep -q 'run-parts(/etc/cron.daily)'
|
|
Athmane Madjoudj |
4f8977 |
|
|
Athmane Madjoudj |
4f8977 |
|
|
Athmane Madjoudj |
4f8977 |
t_CheckExitStatus $?
|