summaryrefslogtreecommitdiffhomepage
path: root/debian/keysafe-server.postinst
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2016-10-23 13:03:34 -0700
committerSean Whitton <spwhitton@spwhitton.name>2016-10-23 13:03:34 -0700
commit144fddad929f4dc5d9ce730a0fdcea998fa546db (patch)
treef5c2ef74cc97ba0d750abf398e6510771033deb3 /debian/keysafe-server.postinst
parent628fadf6d6959dd5d7c04fc325f3c9ba6078f18a (diff)
downloadkeysafe-144fddad929f4dc5d9ce730a0fdcea998fa546db.tar.gz
check dir exists before chowning
Diffstat (limited to 'debian/keysafe-server.postinst')
-rwxr-xr-xdebian/keysafe-server.postinst2
1 files changed, 1 insertions, 1 deletions
diff --git a/debian/keysafe-server.postinst b/debian/keysafe-server.postinst
index 38508cc..7282e29 100755
--- a/debian/keysafe-server.postinst
+++ b/debian/keysafe-server.postinst
@@ -6,7 +6,7 @@ if ! getent passwd _keysafe >/dev/null; then
adduser --system --group --disabled-login --disabled-password \
--home /var/lib/keysafe --force-badname _keysafe
chmod 700 /var/lib/keysafe
-else
+elif [ -d "/var/lib/keysafe" ]; then
chown -R _keysafe:_keysafe /var/lib/keysafe
fi