summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-cluster/gearmand/files')
-rw-r--r--sys-cluster/gearmand/files/gearmand.init.d15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys-cluster/gearmand/files/gearmand.init.d b/sys-cluster/gearmand/files/gearmand.init.d
index 10ec883f8a35..50414a77d45b 100644
--- a/sys-cluster/gearmand/files/gearmand.init.d
+++ b/sys-cluster/gearmand/files/gearmand.init.d
@@ -1,5 +1,5 @@
#!/sbin/runscript
-# Copyright 2009 Pavel Stratil, senbonzakura.eu
+# Copyright 2009-2010 Pavel Stratil, senbonzakura.eu
# Distributed under the terms of the GNU General Public License v2
depend() {
@@ -63,6 +63,19 @@ start() {
;;
esac
+
+ if [ ! -d /var/run/gearmand ] ; then
+ mkdir -p /var/run/gearmand
+ chown gearmand:nogroup /var/run/gearmand
+ chmod 0755 /var/run/gearmand
+ fi
+
+ if [ ! -d /var/log/gearmand ] ; then
+ mkdir -p /var/log/gearmand
+ chown gearmand:nogroup /var/log/gearmand
+ chmod 0755 /var/log/gearmand
+ fi
+
ebegin "Starting ${SVCNAME}"
start-stop-daemon --pidfile /var/run/gearmand/gearmand.pid --start \
--exec /usr/sbin/gearmand -- --pid-file=/var/run/gearmand/gearmand.pid \