-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Linux: Don't create user for systemd units use sysusers
Signed-off-by: Björn Bidar <[email protected]>
- Loading branch information
Showing
2 changed files
with
6 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -109,6 +109,7 @@ install -D -m 644 src/init/davmail.service %{buildroot}%{_unitdir}/davmail.servi | |
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 | ||
install -D -m 644 src/init/daivmail_sysusers.conf %{buildroot}%{_sysusersdir}/davmail.conf | ||
%else | ||
install -m 0775 src/init/davmail-init $RPM_BUILD_ROOT%{_sysconfdir}/init.d/davmail | ||
ln -sf %{_sysconfdir}/init.d/davmail $RPM_BUILD_ROOT%{_sbindir}/rcdavmail | ||
|
@@ -132,10 +133,11 @@ install -m 0644 src/appstream/org.davmail.DavMail.appdata.xml $RPM_BUILD_ROOT%{_ | |
rm -rf $RPM_BUILD_ROOT | ||
|
||
%pre | ||
%if 0%{!?systemd_macros:1} | ||
/usr/sbin/groupadd -f -r davmail > /dev/null 2>&1 || : | ||
/usr/sbin/useradd -r -s /sbin/nologin -d /var/lib/davmail -M \ | ||
-g davmail davmail > /dev/null 2>&1 || : | ||
%if %systemd_macros | ||
%else | ||
%service_add_pre davmail.service | ||
%endif | ||
|
||
|
@@ -230,6 +232,7 @@ fi | |
- Create initial log file with systemd-tmpfiles | ||
- Harden systemd service | ||
- Add systemd system sevice template unit | ||
- Don't create user for systemd units use sysusers | ||
* 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,2 @@ | ||
#Type Name ID GECOS Home directory Shell | ||
u davmail - "DavMail Exchange and Office 365 Gateway" - - |