[sheepdog] [PATCH v1] fix systemd service to run sheep in foreground and with defaults

Vasiliy Tolstov v.tolstov at selfip.ru
Wed Apr 8 08:26:05 CEST 2015


sheepdog now able to run in foreground, so use this in systemd service,
also remove running shell script to get defaults, because it provided
in service file now.

Signed-off-by: Vasiliy Tolstov <v.tolstov at selfip.ru>
---
 script/sheepdog.service.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/script/sheepdog.service.in b/script/sheepdog.service.in
index ac4f955..2efeed9 100644
--- a/script/sheepdog.service.in
+++ b/script/sheepdog.service.in
@@ -4,15 +4,15 @@ After=network.target
 Wants=syslog.target
 
 [Service]
+Environment="DAEMON_ARGS=--cluster local --log dst=syslog -f --upgrade" "SHEEPDOG_PATH=@LOCALSTATEDIR@/lib/sheepdog"
 EnvironmentFile=- at SYSCONFDIR@/conf.d/sheepdog.conf
 EnvironmentFile=- at SYSCONFDIR@/sysconfig/sheepdog
 EnvironmentFile=- at SYSCONFDIR@/default/sheepdog
-ExecStart=/bin/sh -c 'ulimit -n 32768; @SBINDIR@/sheep --pidfile @LOCALSTATEDIR@/run/sheep.pid $(if [ -z "$SHEEP_OPTS" ]; then echo "--cluster local --log dst=syslog --upgrade @LOCALSTATEDIR@/lib/sheepdog"; else echo $SHEEP_OPTS; fi)'
-PIDFile=@LOCALSTATEDIR@/run/sheep.pid
-Type=forking
+ExecStart=/usr/sbin/sheep $DAEMON_ARGS $SHEEPDOG_PATH
 Restart=on-abort
 StartLimitInterval=10s
 StartLimitBurst=3
+LimitNOFILE=830000
 
 [Install]
 WantedBy=multi-user.target
-- 
2.3.3




More information about the sheepdog mailing list