Apcupsd smart sleep (delayed wakeup) patch