diff options
-rw-r--r-- | icecream-scheduler.service | 10 | ||||
-rw-r--r-- | icecream-schedulerd | 17 | ||||
-rw-r--r-- | icecream.service | 13 | ||||
-rw-r--r-- | icecreamd | 2 |
4 files changed, 25 insertions, 17 deletions
diff --git a/icecream-scheduler.service b/icecream-scheduler.service index eda4c204ac95..8aa12adcb848 100644 --- a/icecream-scheduler.service +++ b/icecream-scheduler.service @@ -1,10 +1,12 @@ [Unit] -Description=icecream scheduler -Wants=network.target +Description=Icecream distributed compiler scheduler [Service] -Type=forking +Type=simple +User=icecream +Group=icecream +SyslogIdentifier=icecc-scheduler ExecStart=/usr/lib/icecream/icecream-schedulerd [Install] -Alias=multi-user.target.wants/icecream-scheduler.service +WantedBy=multi-user.target diff --git a/icecream-schedulerd b/icecream-schedulerd index 6e28204f45d0..10bc0ed71097 100644 --- a/icecream-schedulerd +++ b/icecream-schedulerd @@ -1,15 +1,16 @@ -#!/bin/bash +#!/bin/sh + . /etc/icecream.conf netname= -if test -n "${ICECREAM_NETNAME}"; then - netname="-n ${ICECREAM_NETNAME}" +if test -n "$ICECREAM_NETNAME"; then + netname="-n $ICECREAM_NETNAME" fi logfile="" -if test -n "${ICECREAM_LOG_FILE}"; then - touch ${ICECREAM_LOG_FILE} - chown icecc:icecc ${ICECREAM_LOG_FILE} - logfile="-l ${ICECREAM_LOG_FILE}" +if test -n "$ICECREAM_LOG_FILE"; then + touch $ICECREAM_LOG_FILE + chown icecream:icecream $ICECREAM_LOG_FILE + logfile="-l $ICECREAM_LOG_FILE" fi -/usr/lib/icecream/sbin/icecc-scheduler -d ${netname} ${logfile} &>/dev/null +/usr/lib/icecream/sbin/icecc-scheduler -u icecream ${netname} ${logfile} &>/dev/null diff --git a/icecream.service b/icecream.service index b5e464f0c4f9..52ad5fcb15ef 100644 --- a/icecream.service +++ b/icecream.service @@ -1,10 +1,15 @@ [Unit] -Description=icecream worker -Wants=network.target +Description=Icecream Distributed Compiler +After=network.target nss-lookup.target [Service] -Type=forking +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 +SyslogIdentifier=iceccd ExecStart=/usr/lib/icecream/icecreamd +Nice=5 [Install] -Alias=multi-user.target.wants/icecream.service +WantedBy=multi-user.target diff --git a/icecreamd b/icecreamd index 8659713f03d3..f0ca66f1960d 100644 --- a/icecreamd +++ b/icecreamd @@ -32,4 +32,4 @@ if test -n "${ICECREAM_MAX_JOBS}"; then fi fi -/usr/lib/icecream/sbin/iceccd -d ${logfile} ${nice} ${scheduler} ${netname} -b "${ICECREAM_BASEDIR}" ${maxjobs} ${noremote} &>/dev/null +/usr/lib/icecream/sbin/iceccd -u icecream ${logfile} ${nice} ${scheduler} ${netname} -b "${ICECREAM_BASEDIR}" ${maxjobs} ${noremote} &>/dev/null |