blob: f7d1def0e2c6b4b4ac74d8aef15996c48cfb3c27 (
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
|
post_install() {
# Add rserve user and group.
getent group rserve &>/dev/null || groupadd -r rserve >/dev/null
getent passwd rserve &>/dev/null || useradd -m -d /home/rserve \
-s /bin/false -r -g rserve rserve >/dev/null
# Exec the chmod just like in the Makefile.
chmod 750 /home/rserve
# Add rsd user and group.
getent group rsd &>/dev/null || groupadd -r rsd >/dev/null
getent passwd rsd &>/dev/null || useradd -s /bin/false \
-r -g rsd rsd >/dev/null
# This is explained in the Arch Wiki. It seems that anyone belonging to the
# docker group has root capablities, so creating a separate user to run
# Docker is necessary in my opinion.
gpasswd -a rsd docker >/dev/null
chown -R rsd:rsd /usr/share/rserve-sandbox-docker
printf "\n\nYou can start and enable \
rserve-sandbox-docker.service to run the server.\n\n"
}
post_remove() {
printf "\n\nTo remove images and containters: rm -rf /var/lib/docker \
as described in \
https://docs.docker.com/engine/installation/linux/archlinux/#/uninstallation\n"
printf "You can also remove /home/rserve\n"
printf "as well as rserve and rsd users and groups.\n\n"
}
|