I have the following service configured:
[Unit] Description=SCollector After=NetworkManager.service [Service] Type=simple ExecStart=/bin/sh -c "/opt/scollector/scollector /opt/scollector/collectors || (echo '' | /usr/bin/mail -s 'scollector died' email@example.com && exit -1)" Restart=on-failure [Install] WantedBy=multi-user.target
For some reason, that
scollector process exits with non-0. This works AOK when run on the command line,
/bin/sh call and all. I've captured STDOUT and STDERR of
What gives? Why won't it send mail?