MCPcopy Create free account
hub / github.com/git/git / systemd_timer_setup_units

Function systemd_timer_setup_units

builtin/gc.c:3226–3242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3224}
3225
3226static int systemd_timer_setup_units(void)
3227{
3228 int minute = get_random_minute();
3229 const char *exec_path = git_exec_path();
3230
3231 int ret = systemd_timer_write_service_template(exec_path) ||
3232 systemd_timer_enable_unit(1, SCHEDULE_HOURLY, minute) ||
3233 systemd_timer_enable_unit(1, SCHEDULE_DAILY, minute) ||
3234 systemd_timer_enable_unit(1, SCHEDULE_WEEKLY, minute);
3235
3236 if (ret)
3237 systemd_timer_delete_units();
3238 else
3239 systemd_timer_delete_stale_timer_templates();
3240
3241 return ret;
3242}
3243
3244static int systemd_timer_update_schedule(int run_maintenance, int fd UNUSED)
3245{

Callers 1

Tested by

no test coverage detected