clickhouse-lts-223/clickhouse-lts.install

19 lines
508 B
Plaintext

post_install() {
groupadd -r clickhouse &>/dev/null
useradd -r -g clickhouse -d /var/lib/clickhouse -s /bin/false clickhouse &>/dev/null
mkdir -p /var/lib/clickhouse/
chmod 0750 /var/lib/clickhouse
mkdir -p /var/log/clickhouse-server
chown clickhouse:clickhouse -R /var/lib/clickhouse /var/log/clickhouse-server
ldconfig
}
post_remove() {
if getent passwd clickhouse &>/dev/null; then
userdel clickhouse
fi
if getent group clickhouse &>/dev/null; then
groupdel clickhouse
fi
}