Monotone-Parent: d32a13b0eac81022df3f33f387e62593317e4287

Monotone-Revision: bf1f76a700dd5013f40d490b2329d5c127f21fbf

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-03-23T21:19:54
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2009-03-23 21:19:54 +00:00
parent 48dccb2316
commit 28e34ba8aa
+15 -12
View File
@@ -59,20 +59,23 @@ if [ ! -x $DAEMON ]; then
exit 1
fi
if [ `/usr/bin/stat /var/run/sogo -c %U` != "sogo" ]; then
echo "/var/run/sogo is not owned by the sogo user."
exit 1
fi
checkDir() {
directory="$1"
if [ ! -d "$directory" ]
then
echo "$directory does not exist."
exit 1
fi
if [ `/usr/bin/stat /var/spool/sogo -c %U` != "sogo" ]; then
echo "/var/spool/sogo is not owned by the sogo user."
exit 1
fi
if [ `/usr/bin/stat "$directory" -c %U` != "$USER" ]
then
echo "$directory is not owned by the sogo user."
exit 1
fi
}
if [ `/usr/bin/stat /var/log/sogo -c %U` != "sogo" ]; then
echo "/var/log/sogo is not owned by the sogo user."
exit 1
fi
checkDir /var/run/sogo
checkDir /var/spool/sogo
#set -e