cron 628 B

12345678910111213141516
  1. #!/usr/bin/env bash
  2. [ -z "$1" ] && echo "Please specify a service operation (start|stop|status|restart|reload|force-reload)" && exit
  3. if [ "$1" == "start" ]; then
  4. # Create the .cron-enabled file when starting cron
  5. bin/cli touch /var/www/html/var/.cron-enabled
  6. fi
  7. if [ "$1" == "stop" ]; then
  8. # Remove the .cron-enabled file when stopping cron
  9. bin/cli rm -f /var/www/html/var/.cron-enabled
  10. fi
  11. bin/root service cron "$@"
  12. bin/root touch /var/www/html/var/.setup_cronjob_status /var/www/html/var/.update_cronjob_status
  13. bin/root chown app:app /var/www/html/var/.setup_cronjob_status /var/www/html/var/.update_cronjob_status