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 isspecified 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@srv-rhsoft:~]$ systemd-run -t --unit=contentlounge-cleanup.service
Command line to execute required.
[root@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
signature.asc
Description: OpenPGP digital signature
_______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
