You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
692 B

  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2015 OpenWrt.org
  3. START=50
  4. USE_PROCD=1
  5. start_service() {
  6. [ -d /var/spool/cron/atjobs ] || {
  7. mkdir -m 0755 -p /var/spool/cron/atjobs
  8. touch /var/spool/cron/atjobs/.SEQ
  9. chown -R nobody:nogroup /var/spool/cron/atjobs
  10. }
  11. [ -d /var/spool/cron/atspool ] || {
  12. mkdir -m 0755 -p /var/spool/cron/atspool
  13. chown -R nobody:nogroup /var/spool/cron/atspool
  14. }
  15. procd_open_instance
  16. procd_set_param command /usr/sbin/atd -f
  17. procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
  18. procd_set_param stdout 1 # forward stdout of the command to logd
  19. procd_set_param stderr 1 # same for stderr
  20. procd_close_instance
  21. }