systemd.service(5)
says:
ExecStart=
Commands with their arguments that are executed when this service is started.
So, systemd
runs your /apppath/appname
with args >
, /filepath/filename
, 2>&1
Try:
ExecStart=/bin/sh -c '/apppath/appname > /filepath/filename 2>&1'