blob: 2012a34f36c401a5217b73c005609d44d8c44dee (
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
35
36
|
GROUP="nobody"
USER="nobody"
pre_install() {
# Create User/Group
# getent group $GROUP > /dev/null || groupadd --system $GROUP
# getent passwd $USER > /dev/null || useradd --system -g $GROUP \
# --home-dir /opt/openmeetings \
# --no-create-home $USER
echo "pre_install"
}
post_install() {
echo "Changing the owner and / or group for the specified files"
find /opt/openmeetings ! -user "$USER" -print0 | xargs -0 --no-run-if-empty chown "$USER"
find /opt/openmeetings ! -group "$GROUP" -print0 | xargs -0 --no-run-if-empty chgrp -v "$GROUP"
chown $USER:$GROUP /run/openmeetings
}
# arg 1: the new package version
# arg 2: the old package version
pre_upgrade() {
pre_install
}
post_upgrade() {
post_install
}
post_remove() {
echo "post_remove"
# echo "Deleting user $USER"
# getent passwd $USER > /dev/null && userdel $USER
# echo "Deleting group $GROUP"
# getent group $GROUP > /dev/null && groupdel $GROUP
}
|