-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Linux: Add systemd system sevice template unit
Signed-off-by: Björn Bidar <[email protected]>
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,6 +106,7 @@ desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications/ src/desktop/ | |
install -m 0775 src/init/davmail-wrapper $RPM_BUILD_ROOT%{_localstatedir}/lib/davmail/davmail | ||
%if %systemd_support | ||
install -D -m 644 src/init/davmail.service %{buildroot}%{_unitdir}/davmail.service | ||
install -D -m 644 src/init/[email protected] %{buildroot}%{_unitdir}/[email protected] | ||
install -D -m 644 src/init/davmail-user.service %{buildroot}%{_userunitdir}/davmail.service | ||
install -D -m 644 src/init/daivmail.conf %{buildroot}%{_tmpfilesdir}/davmail.conf | ||
%else | ||
|
@@ -228,6 +229,7 @@ fi | |
- Add systemd unit for systemd --user instance | ||
- Create initial log file with systemd-tmpfiles | ||
- Harden systemd service | ||
- Add systemd system sevice template unit | ||
|
||
* Wed Jul 07 2021 Michal Suchanek <[email protected]> | ||
- Tumbleweed no longer supports init.d services and fails build when installed | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[Unit] | ||
Description=Davmail Exchange gateway for %i | ||
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 | ||
AmbientCapabilities=CAP_NET_BIND_SERVICE | ||
ExecStart=/usr/bin/davmail -server /etc/davmail/%i.properties | ||
SuccessExitStatus=143 | ||
PrivateTmp=yes | ||
ProtectSystem=full | ||
ProtectHome=yes | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
DefaultInstance=davmail |