acct-user/strelaysrv: Port to ver_replacing

Signed-off-by: Ulrich Müller <ulm@gentoo.org>
This commit is contained in:
Ulrich Müller 2025-02-14 15:10:43 +01:00
parent 820c562e99
commit dc4a10c445
No known key found for this signature in database
GPG Key ID: 5188335088415E2E

View File

@ -1,9 +1,9 @@
# Copyright 2019-2023 Gentoo Authors
# Copyright 2019-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit acct-user
inherit acct-user eapi9-ver
DESCRIPTION="User for the Syncthing relay server"
ACCT_USER_ID=496
@ -14,14 +14,8 @@ 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
if ver_replacing -lt 1; then
ewarn "The home directory of this user has changed to /var/lib/syncthing-relaysrv"
ewarn "If you have any files in /var/lib/${PN}, move them to the new location by hand"
break
fi
done
fi
}