This commit is contained in:
blshkv 2020-10-05 18:55:59 +08:00
parent 5e12b00d7e
commit a0df25a9c8
No known key found for this signature in database
GPG key ID: 32BDCED870788F04
2 changed files with 24 additions and 2 deletions

View file

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils java-pkg-2 desktop
inherit eutils java-pkg-2 desktop systemd
#https://sourceforge.net/projects/davmail/files/davmail/
MY_PN="davmail"
@ -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"
IUSE="server systemd"
DEPEND="|| ( >=virtual/jre-1.6:*
>=virtual/jdk-1.6:*
@ -37,6 +37,10 @@ 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

View file

@ -0,0 +1,18 @@
[Unit]
Description=Davmail Exchange gateway
Documentation=http://davmail.sourceforge.net/serversetup.html
Documentation=http://davmail.sourceforge.net/advanced.html
Documentation=http://davmail.sourceforge.net/sslsetup.html
After=network.target
[Service]
Type=simple
User=davmail
PermissionsStartOnly=true
ExecStartPre=/usr/bin/touch /var/log/davmail.log
ExecStartPre=/bin/chown davmail:davmail /var/log/davmail.log
ExecStart=/usr/bin/davmail -server /etc/davmail.properties
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target