blob: fc1db7a4a1300e575aa696d01ecc4ef6a42d1f07 (
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
|
# Copyright 2019-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit acct-user
DESCRIPTION="User for the Syncthing discovery server"
ACCT_USER_ID=497
ACCT_USER_HOME=/var/lib/syncthing-discosrv
ACCT_USER_HOME_PERMS=0770
ACCT_USER_GROUPS=( syncthing )
acct-user_add_deps
pkg_postinst() {
if [[ -n "${REPLACING_VERSIONS}" ]]; then
local rver
for rver in ${REPLACING_VERSIONS} ; do
if ver_test "${rver}" -lt 1; then
ewarn "The home directory of this user has changed to /var/lib/syncthing-discosrv"
ewarn "If you have any files in /var/lib/${PN}, move them to the new location by hand"
break
fi
done
fi
}
|