From 23d2016bc1c6ae158977670b2ded3fc626375006 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Sep 02 2013 08:53:08 +0000 Subject: log to journal/syslog, not the custom log files ... which we did not even ship a logrotate config for. --- 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]