mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Execute omr-schedule every minutes
This commit is contained in:
parent
abe757bd00
commit
9cbeb186f9
2 changed files with 3 additions and 1 deletions
|
@ -2,6 +2,8 @@
|
||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/functions/network.sh
|
. /lib/functions/network.sh
|
||||||
|
|
||||||
|
[ -n "$(pgrep -f 'omr-schedule')" ] && exit 0
|
||||||
|
|
||||||
for schedule_bin in /usr/share/omr/schedule.d/*; do
|
for schedule_bin in /usr/share/omr/schedule.d/*; do
|
||||||
[ -x "$schedule_bin" ] && (
|
[ -x "$schedule_bin" ] && (
|
||||||
_log() {
|
_log() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if [ ! -f /etc/crontabs/root ] || [ "$(cat /etc/crontabs/root | grep omr-schedule)" = "" ]; then
|
if [ ! -f /etc/crontabs/root ] || [ "$(cat /etc/crontabs/root | grep omr-schedule)" = "" ]; then
|
||||||
echo "*/5 * * * * /bin/omr-schedule" >> /etc/crontabs/root
|
echo "* * * * * /bin/omr-schedule" >> /etc/crontabs/root
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue