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'
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…