From 4223efe8478aeea5a935ad3c36e8d6d68b3c3684 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 12 May 2010 20:51:09 +0000 Subject: [PATCH] Monotone-Parent: 040bd1715b830a5d3edbe62f74648a06fc6119c3 Monotone-Revision: be0da0bd8363b7c7cad461613780c0a11c3c248d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-05-12T20:51:09 Monotone-Branch: ca.inverse.sogo --- debian/sogo.init | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/debian/sogo.init b/debian/sogo.init index 32ea0f97a..e9c18972d 100644 --- a/debian/sogo.init +++ b/debian/sogo.init @@ -11,7 +11,7 @@ # SOGo init script for Debian GNU/Linux # -# Copyright (C) 2007-2009 Inverse inc. +# Copyright (C) 2007-2010 Inverse inc. # # Author: Wolfgang Sourdeau # Ludovic Marcotte @@ -47,29 +47,14 @@ if [ -f /etc/default/$NAME ]; then fi if [ ! -x $DAEMON ]; then - echo "$DAEMON is not executable." - exit 1 + echo "$DAEMON is not executable." + exit 1 fi -checkDir() { - directory="$1" - if [ ! -d "$directory" ] - then - echo "$directory does not exist." - exit 1 - fi - - if [ `/usr/bin/stat "$directory" -c %U` != "$USER" ] - then - echo "$directory is not owned by the '$USER' user." - exit 1 - - fi -} - -checkDir /var/run/$NAME -checkDir /var/spool/$NAME -checkDir /var/log/$NAME +# Ensure directory's existence and permissions +install -o sogo -g adm -m 755 -d /var/run/$NAME +install -o sogo -g adm -m 750 -d /var/spool/$NAME +install -o sogo -g adm -m 750 -d /var/log/$NAME set -e