1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#! /bin/sh
set -e
prevver="$2"
add_munin_async_user() {
if ! getent passwd munin-async >/dev/null; then
adduser --group --system --home /var/lib/munin-async --shell /bin/bash munin-async
fi
# workaround bug (#531021) in xen-tools (user exists, but group is missing)
if ! getent group munin-async >/dev/null; then
addgroup --system munin-async
adduser munin-async munin-async
fi
}
initperms() {
chown munin-async:munin-async /var/lib/munin-async
}
case "$1" in
configure)
add_munin_async_user
if [ -z "$2" ]; then
initperms
fi
;;
esac
#DEBHELPER#
|