blob: d2ad93ebbce242c0564d9ef84df7ae987c0c4924 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
pre_install() {
pkgname=aurbuilder
if ! id -u $pkgname > /dev/null 2>&1; then
useradd -r -U $pkgname -d /var/lib/$pkgname -m -s /usr/bin/nologin
uid=$(id -u $pkgname)
gid=$(id -g $pkgname)
usermod --add-subuids "${uid}000-${uid}999" \
--add-subgids "${gid}000-${gid}999" \
$pkgname
loginctl enable-linger "$uid"
else
echo "WARNING: user $pkgname already exists. Make sure it is configured correctly"
fi
mkdir -p /srv/pkg
chown $pkgname:$pkgname /srv/pkg
}
|