[systemd-devel] systemd-run via crond: status=208/STDIN
Reindl Harald
h.reindl at thelounge.net
Thu Dec 31 08:23:00 PST 2015
systemd-219-26.fc22.x86_64
* in a ssh shell on Fedora 22 the script below works fine
* called via /etc/crontab it fails
* Unknown assignment StandardInput=null
WHY?
the intention is finally spwan namespaces (sadly not possible with
F22/F23 and systemd-run at all) to protect the OS and replace direct
calls in /etc/crontab with such wrappers to get the well known cronmails
if there is any output (and no generate the mails in the scripts is no
valid option - they don#t have to call a MTA directly)
__________________________________________
Dez 31 17:08:01 mail-gw.thelounge.net systemd[1]:
spamfilter-fetch-samples.service: main process exited, code=exited,
status=208/STDIN
Dez 31 17:08:01 mail-gw.thelounge.net systemd[1]: Failed to start
spamfilter-fetch-samples.
Dez 31 17:08:01 mail-gw.thelounge.net systemd[1]: Unit
spamfilter-fetch-samples.service entered failed state.
Dez 31 17:08:01 mail-gw.thelounge.net systemd[1]:
spamfilter-fetch-samples.service failed.
__________________________________________
[root at mail-gw:~]$ cat /usr/local/bin/spamfilter-fetch-samples
#!/usr/bin/dash
/usr/bin/systemd-run -t --service-type=oneshot --quiet --nice=19
--unit=spamfilter-fetch-samples --description=spamfilter-fetch-samples
/usr/bin/php -d
open_basedir="/tmp:/scripts:/usr/local:/var/lib/spamass-milter/training"
/usr/local/bin/workers/spamfilter-fetch-samples.php
# Fedora 24: -p ProtectSystem=full,ProtectHome=yes
-------------- 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/20151231/bd353cb2/attachment.sig>
More information about the systemd-devel
mailing list