I've created a service; lets call it abc.service. I run:
sudo systemctl enable /home/pi/abc.service 1>output.txt 2>error.txtand output.txt is empty while error.txt contains:
Created symlink /etc/systemd/system/ -> /home/pi/abc.service.
Created symlink /etc/systemd/system/abc.service -> /home/pi/abc.service.Why is this?
EDIT: My purpose is this -- I have a global program running that can run commands, and commands with stderr are flagged and printed to error files. However, it seems like systemd is printing to stderr (and therefore my error files) even though it seems like it's not an error.
EDIT2: Example systemd file:
[Unit]
Description=Test file
[Service]
Type=simple
ExecStart=/bin/ls /home/pi
[Install]
WantedBy=multi-user.targetJust tested, enabling this file prints to stderr (like error.txt from above). Tested service, prints dir contents of home directory.
1 Answer
There is a lot of documentation here:systemd man page
You might also redirect the "enable" output to stdout (although that might redirect real errors there too.
It does seem like the action does not follow Unix "standards" as to what is an error and what is not.
1