#!/bin/sh
for dir in lib log; do
	if [ ! -d /var/${dir}/quassel ]; then
		mkdir /var/${dir}/quassel &&
			chown -R quassel:quassel /var/${dir}/quassel &&
			chmod 750 /var/${dir}/quassel
	fi
done
exec chpst -u quassel quasselcore \
    --logfile=/var/log/quassel/quasselcore.log \
    --configdir=/var/lib/quassel \
    --require-ssl
