#!/bin/sh

set -e

#PKGOS-INCLUDE#

if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ] ; then
	deluser -q swift adm 2>/dev/null || true
	pkgos_adduser swift

	mkdir -p /var/backups/swift
	chown swift:swift /var/backups/swift
	chmod 2770 /var/backups/swift

	mkdir -p /var/cache/swift
	chown swift:swift /var/cache/swift
	chmod 2770 /var/cache/swift
fi

#DEBHELPER#

exit 0
