--- /dev/null
+#! /bin/sh
+
+set -e
+
+user=keys
+home=/var/lib/distorted-keys
+
+## Make sure the user exists.
+if ! grep -q ^$user: /etc/passwd; then
+ adduser --quiet --system --group \
+ --disabled-password --shell /bin/false \
+ --no-create-home --home $home \
+ $user
+fi
+
+## Make the home directory if we need to.
+if [ ! -d $home ]; then
+ mkdir -p $home
+ chown $user:$user $home
+ chmod 2755 $home
+fi