summaryrefslogtreecommitdiffstats
path: root/wallace
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-07-12 11:55:25 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-07-12 11:55:44 +0100
commit63e9da31281eda0d634c2511e404d50e64a908af (patch)
treea9bcc64c9e53ea958f9ec30d246ac49c8ed5f0ca /wallace
parent0b6ae00ef5e3a41780928c7d2ecae9f7eb045a20 (diff)
downloadpykolab-63e9da31281eda0d634c2511e404d50e64a908af.tar.gz
Correct permission problem on the pidfile directory (#877)
Diffstat (limited to 'wallace')
-rw-r--r--wallace/wallace.sysvinit7
1 files changed, 6 insertions, 1 deletions
diff --git a/wallace/wallace.sysvinit b/wallace/wallace.sysvinit
index f3ee9b6..3cae773 100644
--- a/wallace/wallace.sysvinit
+++ b/wallace/wallace.sysvinit
@@ -21,6 +21,8 @@
# Source our configuration file for these variables.
FLAGS="--fork -l warning"
+USER="kolab"
+GROUP="kolab"
if [ -f /etc/sysconfig/wallace ] ; then
. /etc/sysconfig/wallace
@@ -33,7 +35,10 @@ RETVAL=0
prog=wallace
path=/usr/sbin/wallaced
lockfile=/var/lock/subsys/$prog
-pidfile=/var/run/wallace/wallaced.pid
+pidfile=/var/run/wallaced/wallaced.pid
+
+[ ! -d "$(dirname ${pidfile})" ] && mkdir -p $(dirname ${pidfile})
+chown ${USER}:${GROUP} $(dirname ${pidfile})
start() {
[ -x $path ] || exit 5