summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Korepanov <kaikaikai@yandex.ru>2019-06-15 22:18:09 +0100
committerMichał Górny <mgorny@gentoo.org>2019-06-18 12:02:47 +0200
commit643150fedc69f86f53b6b14cf71f5a5a5663a6b3 (patch)
tree403ef9c8a6d2b88bba0c9cff51b3cf61f740c3d5 /net-vpn/i2pd
parentnet-vpn/i2pd: 2.26.0 version bump (diff)
downloadgentoo-643150fedc69f86f53b6b14cf71f5a5a5663a6b3.tar.gz
gentoo-643150fedc69f86f53b6b14cf71f5a5a5663a6b3.tar.bz2
gentoo-643150fedc69f86f53b6b14cf71f5a5a5663a6b3.zip
net-vpn/i2pd: move user&group to pkg_preinst
Signed-off-by: Alexey Korepanov <kaikaikai@yandex.ru> Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'net-vpn/i2pd')
-rw-r--r--net-vpn/i2pd/i2pd-2.26.0.ebuild22
1 files changed, 11 insertions, 11 deletions
diff --git a/net-vpn/i2pd/i2pd-2.26.0.ebuild b/net-vpn/i2pd/i2pd-2.26.0.ebuild
index 751c24c92d14..43b8c34e8a56 100644
--- a/net-vpn/i2pd/i2pd-2.26.0.ebuild
+++ b/net-vpn/i2pd/i2pd-2.26.0.ebuild
@@ -79,20 +79,10 @@ src_install() {
doins contrib/i2pd.conf
doins contrib/tunnels.conf
- # grant i2pd group read and write access to config files
- fowners "root:${I2PD_GROUP}" \
- /etc/i2pd/i2pd.conf \
- /etc/i2pd/tunnels.conf
- fperms 660 \
- /etc/i2pd/i2pd.conf \
- /etc/i2pd/tunnels.conf
-
# working directory
keepdir /var/lib/i2pd
insinto /var/lib/i2pd
doins -r contrib/certificates
- fowners "${I2PD_USER}:${I2PD_GROUP}" /var/lib/i2pd/
- fperms 700 /var/lib/i2pd/
# add /var/lib/i2pd/certificates to CONFIG_PROTECT
doenvd "${FILESDIR}/99i2pd"
@@ -107,9 +97,19 @@ src_install() {
newins "${FILESDIR}/i2pd-2.6.0-r3.logrotate" i2pd
}
-pkg_setup() {
+pkg_preinst() {
enewgroup "${I2PD_GROUP}"
enewuser "${I2PD_USER}" -1 -1 /var/lib/run/i2pd "${I2PD_GROUP}"
+
+ fowners "root:${I2PD_GROUP}" \
+ /etc/i2pd/i2pd.conf \
+ /etc/i2pd/tunnels.conf
+ fperms 660 \
+ /etc/i2pd/i2pd.conf \
+ /etc/i2pd/tunnels.conf
+
+ fowners "${I2PD_USER}:${I2PD_GROUP}" /var/lib/i2pd/
+ fperms 700 /var/lib/i2pd/
}
pkg_postinst() {