[icecream] log to journal/syslog, not the custom log files
Michal Schmidt
michich at fedoraproject.org
Mon Sep 2 16:49:37 UTC 2013
commit 23d2016bc1c6ae158977670b2ded3fc626375006
Author: Michal Schmidt <mschmidt at redhat.com>
Date: Fri Aug 30 22:49:56 2013 +0200
log to journal/syslog, not the custom log files
... which we did not even ship a logrotate config for.
icecc-scheduler-wrapper | 9 +--------
icecc-scheduler.service | 7 +++++--
iceccd.service | 3 ++-
3 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/icecc-scheduler-wrapper b/icecc-scheduler-wrapper
index 2ac7370..09e92f5 100644
--- a/icecc-scheduler-wrapper
+++ b/icecc-scheduler-wrapper
@@ -1,7 +1,5 @@
#!/bin/sh
-logfile="$1"
-
config=/etc/sysconfig/icecream
[ -e $config ] && . $config
@@ -10,9 +8,4 @@ if [ -n "$ICECREAM_NETNAME" ] ; then
netname="-n $ICECREAM_NETNAME"
fi
-touch "$logfile"
-chown icecream:icecream "$logfile"
-chmod 0640 "$logfile"
-[ -x /sbin/restorecon ] && /sbin/restorecon "$logfile"
-
-exec /sbin/runuser -s /bin/sh icecream --session-command="/usr/sbin/icecc-scheduler -d -l \"$logfile\" $netname"
+exec /usr/sbin/icecc-scheduler $netname
diff --git a/icecc-scheduler.service b/icecc-scheduler.service
index 6f85c92..702f80e 100644
--- a/icecc-scheduler.service
+++ b/icecc-scheduler.service
@@ -2,8 +2,11 @@
Description=Icecream distributed compiler scheduler
[Service]
-Type=forking
-ExecStart=/usr/libexec/icecc/icecc-scheduler-wrapper /var/log/icecc/scheduler.log
+Type=simple
+User=icecream
+Group=icecream
+SyslogIdentifier=icecc-scheduler
+ExecStart=/usr/libexec/icecc/icecc-scheduler-wrapper
[Install]
WantedBy=multi-user.target
diff --git a/iceccd.service b/iceccd.service
index 2e8743f..bf5730b 100644
--- a/iceccd.service
+++ b/iceccd.service
@@ -7,7 +7,8 @@ Type=simple
# Set SHELL so that icecc-create-env does not have to attempt to detect its
# value by reading /etc/passwd. The SELinux policy does not need to allow it.
Environment=SHELL=/bin/bash
-ExecStart=/usr/libexec/icecc/iceccd-wrapper -u icecream -b /var/cache/icecream -l /var/log/icecc/iceccd.log
+SyslogIdentifier=iceccd
+ExecStart=/usr/libexec/icecc/iceccd-wrapper -u icecream -b /var/cache/icecream -v
Nice=5
[Install]
More information about the scm-commits
mailing list