diff options
author | Marek Szuba <marecki@gentoo.org> | 2021-12-06 16:38:54 +0000 |
---|---|---|
committer | Marek Szuba <marecki@gentoo.org> | 2021-12-09 12:03:13 +0000 |
commit | 91fe5a5e177d06f4532e5f4626b6cc22b5bc7808 (patch) | |
tree | 7716896c06a836a9f6497eb84df3aac7e9b16c38 /acct-user/stdiscosrv | |
parent | www-plugins/chrome-binary-plugins: automated update (97.0.4692.45_beta) (diff) | |
download | gentoo-91fe5a5e177d06f4532e5f4626b6cc22b5bc7808.tar.gz gentoo-91fe5a5e177d06f4532e5f4626b6cc22b5bc7808.tar.bz2 gentoo-91fe5a5e177d06f4532e5f4626b6cc22b5bc7808.zip |
acct-user/stdiscosrv: new home directory and main group
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 <marecki@gentoo.org>
Diffstat (limited to 'acct-user/stdiscosrv')
-rw-r--r-- | acct-user/stdiscosrv/stdiscosrv-1.ebuild | 27 |
1 files changed, 27 insertions, 0 deletions
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 +} |