[systemd-devel] "StandardOutput=console" don't work as expected

Mantas Mikulėnas grawity at gmail.com
Wed Dec 30 01:50:20 PST 2015


On Wed, Dec 30, 2015 at 11:46 AM, Reindl Harald <h.reindl at thelounge.net>
wrote:

>
>
> Am 30.12.2015 um 10:37 schrieb Mantas Mikulėnas:
>
>> On Wed, Dec 30, 2015 at 2:40 AM, Reindl Harald <h.reindl at thelounge.net
>> <mailto:h.reindl at thelounge.net>> wrote:
>>
>>     fine, on a real TTY (CTRL+ALT+F2) the echo appears (cluttered with
>>     echo and the PID instead just the output) but that don't help much
>>     in a SSH-Session..........
>>
>>
>>     Am 30.12.2015 um 01:26 schrieb Reindl Harald:
>>
>>         why is there only logging instead "TEST" written to the terminal
>>         starting a oneshot-service or in case it's a entry in /etc/crontab
>>         triggering a cronmail becaus the output?
>>
>>         that's not helpful when try to migrate cronjobs to systemd-units
>> for
>>         using ReadOnlyDirectory and other security otpions
>>
>> Pretty sure that's normal, +console here always meant /dev/console and
>> not "whatever stdout systemctl has".
>>
>> Do you really have cronjobs which need to output stuff to ssh ptys?
>>
>
> i have hundrets cronjobs which are running silent and if there is
> something wrong then it's echo'ed which means with crond you get a mail
>
> and *no* it's no option to generate a mail at your own when you design
> software over years which runs aboslutely silent and so you know for
> trigger a alter mail you just need to echo the problem in whatever class
> method and you get also PHP warnings for free
>
> the whole point of using echo in cronjobs is that you don't need to know
> anything about the mail-environment, frankly even not need to have access
> to the MTA or sendmail binary from your script
>

Wait, so you're asking for StandardOutput=console to magically get piped to
/usr/sbin/sendmail instead of actual console?

-- 
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20151230/ed027a32/attachment-0001.html>


More information about the systemd-devel mailing list