From 93a93e9a3b53c1a73142a305ea1f8136846942ee Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 22 Dec 2021 14:08:05 +0000 Subject: gentoo resync : 22.12.2021 --- acct-user/stdiscosrv/stdiscosrv-1.ebuild | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 acct-user/stdiscosrv/stdiscosrv-1.ebuild (limited to 'acct-user/stdiscosrv/stdiscosrv-1.ebuild') diff --git a/acct-user/stdiscosrv/stdiscosrv-1.ebuild b/acct-user/stdiscosrv/stdiscosrv-1.ebuild new file mode 100644 index 000000000000..fc1db7a4a130 --- /dev/null +++ b/acct-user/stdiscosrv/stdiscosrv-1.ebuild @@ -0,0 +1,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 +} -- cgit v1.2.3