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

Reindl Harald h.reindl at thelounge.net
Wed Dec 30 03:19:36 PST 2015



Am 30.12.2015 um 12:09 schrieb Martin Pitt:
> 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

but that seems no to support a unit-file the way i need it

"If timer option is specified and unit is exist which is
specified with --unit option then command can be omitted" don't help 
much - why can't that not just fireup "systemd-run -t 
--unit=contentlounge-cleanup.service" unconditional since it's a 
oneshot-service?

"systemd-run: unrecognized option '--pty" is BTW a bug
50 "--property=NAME=VALUE" params are not maintainable

[root at srv-rhsoft:~]$ systemd-run -t --unit=contentlounge-cleanup.service
Command line to execute required.

[root at srv-rhsoft:~]$ systemd-run --help
systemd-run [OPTIONS...] {COMMAND} [ARGS...]
Run the specified command in a transient scope or service or timer
unit. If timer option is specified and unit is exist which is
specified with --unit option then command can be omitted.

   -h --help                       Show this help
      --version                    Show package version
      --user                       Run as user unit
   -H --host=[USER@]HOST           Operate on remote host
   -M --machine=CONTAINER          Operate on local container
      --scope                      Run this as scope rather than service
      --unit=UNIT                  Run under the specified unit name
   -p --property=NAME=VALUE        Set unit property
      --description=TEXT           Description for unit
      --slice=SLICE                Run in the specified slice
      --no-block                   Do not wait until operation finished
   -r --remain-after-exit          Leave service around until explicitly 
stopped
      --send-sighup                Send SIGHUP when terminating
      --service-type=TYPE          Service type
      --uid=USER                   Run as system user
      --gid=GROUP                  Run as system group
      --nice=NICE                  Nice level
      --setenv=NAME=VALUE          Set environment
   -t --pty                        Run service on pseudo tty
   -q --quiet                      Suppress information messages during 
runtime

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20151230/0d4ed070/attachment.sig>


More information about the systemd-devel mailing list