Skip to content

Commit

Permalink
acct-user/stdiscosrv: new home directory and main group
Browse files Browse the repository at this point in the history
To reflect upstream changes to their init scripts and systemd units,
apart from the user name itself - that would be more annoying to fix.

Signed-off-by: Marek Szuba <[email protected]>
  • Loading branch information
Marek Szuba committed Dec 9, 2021
1 parent 90dfda0 commit 91fe5a5
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions acct-user/stdiscosrv/stdiscosrv-1.ebuild
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 91fe5a5

Please sign in to comment.