18 lines
499 B
Bash
Executable File
18 lines
499 B
Bash
Executable File
#!/bin/bash
|
|
echo "Current pwd: $(pwd)"
|
|
for file in "/etc/cron.d/iptv_jobs" "/var/www/iptv-cli"; do
|
|
if [ ! -f "$file" ]; then echo "Not found: $file" && exit 1; fi
|
|
done;
|
|
|
|
echo "Importing crontab /etc/cron.d/iptv_jobs:"
|
|
echo "======================="
|
|
cat /etc/cron.d/iptv_jobs
|
|
echo "======================="
|
|
|
|
crontab -n /etc/cron.d/iptv_jobs || exit 2
|
|
|
|
echo "Running cron with /etc/cron.d/iptv_jobs"
|
|
crontab /etc/cron.d/iptv_jobs
|
|
touch /var/log/cron.log
|
|
cron -L 15 && tail -fn 1 /var/log/cron.log
|