X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=cron.sh;h=d72161ec223e6e2beb5db9dd3739df59b4297a93;hb=77b1a594aa571691e44f5d5f100e6275b88f5f59;hp=9736c035eac62fa20177331319a0dfcb1b4f8b7c;hpb=f940188b7dcf1c9c84400872eb99f5da9a8e5378;p=APKPM.git diff --git a/cron.sh b/cron.sh index 9736c03..d72161e 100755 --- a/cron.sh +++ b/cron.sh @@ -2,6 +2,19 @@ what=$1 +if [ "$what" == "install" ] ; then + +cat > /etc/cron.d/apkpm <<__CRON__ +# m h dom mon dow user command +*/15 * * * * dpavlin /srv/APKPM/cron.sh CPE_poll +*/15 * * * * dpavlin /srv/APKPM/cron.sh ZTEDSLAM_poll +*/15 * * * * dpavlin /srv/APKPM/cron.sh ZTEMSAN_poll +__CRON__ + +exit + +fi + running=`echo status | nc -w 1 localhost 4730 | grep ^$what | cut -d" " -f2` if [ "$running" -gt 0 ] ; then echo "$what allready queued!"