+ # Take ownership of the database and spool directory
+ chown onak /var/lib/onak
+ chown onak /var/spool/onak
+
+ # Create our logfile
+ touch /var/log/onak.log
+ chown onak /var/log/onak.log
+
+ #
+ # If we're using a default config and there's no onak database, create it
+ # by adding my key.
+ #
+ if grep -q "^backend=defaultdb4" /etc/onak.ini &&
+ grep -q "^location=/var/lib/onak" /etc/onak.ini &&
+ [ ! -e /var/lib/onak/num_keydb -a \
+ -e /usr/share/doc/onak/noodles.key.gz ]; then
+ zcat /usr/share/doc/onak/noodles.key | runuser -u onak -- onak -b add
+ fi