blob: 6d844a2080a60b678ddd4c676775d8842869102d (
plain)
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
32
33
34
|
user_list="cp-control-center cp-kafka-connect cp-kafka-rest cp-kafka cp-ksql cp-schema-registry cp-install_kafka"
group=confluent
ensure_directories() {
# Configure Apache kafka
for dir in /var/log/confluent/kafka /var/lib/confluent/kafka /var/lib/confluent/zookeeper; do
install -g confluent -o cp-kafka -m 0755 -d ${pkgdir}/$dir
done
# Required directories for Confluent Control Center
for dir in /var/log/confluent/control-center /var/lib/confluent/control-center /usr/share/confluent-control-center; do
install -g confluent -o cp-control-center -m 0755 -d ${pkgdir}/$dir
done
}
post_install() {
systemd-sysusers confluent.conf
ensure_directories
}
post_upgrade(){
systemd-sysusers confluent.conf
ensure_directories
}
post_remove() {
for usr in `echo $user_list`; do
if getent passwd $usr >/dev/null 2>&1; then
userdel -f $usr
fi
done
groupdel $group
}
|