Files
extra/radicale/radicale.install
2025-06-22 20:39:04 -05:00

26 lines
720 B
Plaintext

post_install() {
# create group and user
if ! getent group radicale &>/dev/null; then
groupadd -r radicale >/dev/null
fi
if ! getent passwd radicale &>/dev/null; then
useradd -r -c "Radicale user" -d /var/empty -g adm -s /bin/nologin radicale >/dev/null
fi
}
post_upgrade() {
# configuration and file system storage changes with >= 3.0.0
if [ "$(vercmp "$2" "3.0.0")" -le 0 ]; then
echo "WARNING: Major changes introduced to filesystem storage and configuration. Read /usr/share/doc/radicale/NEWS.md"
fi
}
post_remove() {
if getent passwd radicale &>/dev/null; then
userdel radicale >/dev/null
fi
if getent group radicale &>/dev/null; then
groupdel radicale >/dev/null
fi
}