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