restart_cron 477 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. # Internal vesta function
  3. # cron system restart
  4. # Importing variables
  5. source $VESTA/conf/vars.conf
  6. crond() {
  7. /etc/init.d/crond 'reload' >/dev/null 2>&1
  8. if [ $? -ne 0 ]; then
  9. #$V_FUNC/report_issue 'sys' 'cron'
  10. echo "$E_RESTART_FAILED $V_EVENT"
  11. fi
  12. }
  13. # Parsing config / or just source config
  14. cron_system=$(grep 'CRON_SYSTEM=' $V_CONF/vesta.conf | cut -f 2 -d \' )
  15. if [ "$cron_system" = 'crond' ]; then
  16. crond
  17. fi
  18. # Logging
  19. exit $OK