rc.fprot 827 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc
  2. ##
  3. ## rc.fprot -- Run-Commands
  4. ##
  5. %config
  6. fprot_enable="$openpkg_rc_def"
  7. fprot_dats="ftp://ftp.f-prot.com/pub/"
  8. fprot_update="daily"
  9. %common
  10. fprot_update () {
  11. rm -rf /tmp/fprot
  12. @l_prefix@/sbin/f-prot-update -cron -quiet || exit $?
  13. chmod 644 @l_prefix@/share/fprot/*.DEF
  14. rm -rf /tmp/fprot
  15. }
  16. %hourly -u @l_musr@
  17. rcService fprot enable yes || exit 0
  18. if [ ".$fprot_update" = .hourly ]; then
  19. fprot_update || exit $?
  20. fi
  21. %daily -u @l_musr@
  22. rcService fprot enable yes || exit 0
  23. if [ ".$fprot_update" = .daily ]; then
  24. fprot_update || exit $?
  25. fi
  26. %weekly -u @l_musr@
  27. rcService fprot enable yes || exit 0
  28. if [ ".$fprot_update" = .weekly ]; then
  29. fprot_update || exit $?
  30. fi