Project

General

Profile

« Previous | Next » 

Revision 8fe38524

Added by Doktor Notor almost 10 years ago

make sure that cron is running before reconfiguring it

This is a resubmit of #1814.

(When cron goes away for whatever reason, you can keep reconfiguring it till blue in face but nothing will happen.)

View differences:

src/etc/inc/services.inc
2438 2438
	file_put_contents("/etc/crontab", $crontab_contents);
2439 2439
	unset($crontab_contents);
2440 2440

  
2441
	/* make sure that cron is running and start it if it got killed somehow */
2442
	if (!is_process_running("cron")) {
2443
		exec("cd /tmp && /usr/sbin/cron -s 2>/dev/null");
2444
	} else {
2441 2445
	/* do a HUP kill to force sync changes */
2442 2446
	sigkillbypid("{$g['varrun_path']}/cron.pid", "HUP");
2447
	}
2443 2448

  
2444 2449
	conf_mount_ro();
2445 2450
}

Also available in: Unified diff