On Wed, 30 Dec 2015, Martin Pitt wrote:
Reindl Harald [2015-12-30 11:35 +0100]:
in the first mail i wrote: "migrate cronjobs to systemd-units for using
ReadOnlyDirectory and other security otpions"

OK, I suggest to use systemd-run -t then, like Michael Chapman already
suggested. This should give you both, direct stdout/err and the
possibility of additional security restrictions.

Ah, neat. I was unaware of the -t (aka --pty) option. I had suggested --scope.

I think --scope could be slightly more appropriate for use in a cron job since it will pass environment variables from the cron job configuration down to the command as normal. With a transient service unit you'd need to use --setenv to supply extra environment variables explicitly.

- Michael
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to