Added various delays, thresholds to the template, so it is configurable.

Adjusted creation of file /etc/default/apcupsd, so it only happens on Debian.