This is what systemd uses, see "man systemd-user-sessions.service".
The source has HOSTNAME=`hostname` (capture output of hostname command) but currently it is replaced with HOSTNAME="/path/to/hostname" (which is just a plain string). Fix it by substituting with HOSTNAME=`/path/to/hostname`.
apcupsd is a daemon for controlling APC UPSes.