properly add and cleanup net-mail/davmail init scripts

* systemd unit files are installed with the systemd_dounit function
* systemd unit files do not have an extra conf file extension
* small files like systemd unit files do not merit a separate use flag (Gentoo policy)
* \#!/sbin/runscript is deprecated, \#!/sbin/openrc-run should be used instead
This commit is contained in:
Erik Quaeghebeur 2020-10-06 09:05:11 +02:00
parent d1b34816e7
commit 94acb4f14f
No known key found for this signature in database
GPG key ID: 16A66A82B80C1EAB
3 changed files with 3 additions and 6 deletions

View file

@ -14,7 +14,7 @@ SRC_URI="mirror://sourceforge/${MY_PN}/${MY_PN}-$(ver_cut 1-3)-$(ver_cut 4).zip"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="server systemd"
IUSE="server"
DEPEND="|| ( >=virtual/jre-1.6:*
>=virtual/jdk-1.6:*
@ -37,10 +37,6 @@ src_install() {
# create wrapper script for the client
java-pkg_dolauncher ${MY_PN} --main ${MY_PN}.DavGateway --java_args ""
if use systemd ; then
systemd_install_serviced "${FILESDIR}"/davmail.service.conf
fi
if use server ; then
# log file
touch ${MY_PN}.log
@ -53,6 +49,7 @@ src_install() {
doins "${FILESDIR}"/${MY_PN}.properties
newinitd "${FILESDIR}"/${MY_PN}.init ${MY_PN}
newconfd "${FILESDIR}"/${MY_PN}.conf ${MY_PN}
systemd_dounit "${FILESDIR}"/davmail.service
else
# icon
doicon "${FILESDIR}"/${MY_PN}.png

View file

@ -1,4 +1,4 @@
#!/sbin/runscript
#!/sbin/openrc-run
PN="davmail"
USER="${PN}"