| #!/bin/sh -e |
| |
| case "$1" in |
| configure) |
| |
| if ! id cloud > /dev/null 2>&1 ; then |
| adduser --system --home /var/lib/cloud/management --no-create-home \ |
| --group --disabled-password --shell /bin/sh cloud |
| # update me in cloud-client.postinst as well |
| fi |
| |
| for i in /var/log/cloud/usage |
| do |
| chmod 0770 $i |
| chgrp cloud $i |
| done |
| |
| for i in /etc/cloud/usage/db.properties |
| do |
| chmod 0640 $i |
| chgrp cloud $i |
| done |
| |
| if [ "$2" = "" ] ; then # no recently configured version, this is a first install |
| /usr/sbin/update-rc.d cloud-usage defaults || true |
| fi |
| |
| ;; |
| esac |
| |
| #DEBHELPER# |