SHA256
1
0
forked from pool/syncthing
Dominique Leuenberger 2019-03-19 09:02:43 +00:00 committed by Git OBS Bridge
commit 34551a42f0
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Mar 18 17:21:23 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Do not hide errors from useradd.
- Add %systemd_ordering for %service_*.
-------------------------------------------------------------------
Tue Feb 26 11:11:02 UTC 2019 - Bernd Wachter <bernd-obs@wachter.fi>

View File

@ -30,6 +30,7 @@ Source3: %{name}.firewall
BuildRequires: go >= 1.8
BuildRequires: systemd
BuildRequires: systemd-rpm-macros
%{?systemd_ordering}
%description
Syncthing is an application that synchronises files across multiple
@ -40,6 +41,7 @@ on one machine will automatically be replicated to other devices.
Summary: Relay server for syncthing
Group: Productivity/Networking/File-Sharing
Requires(pre): pwdutils
%{?systemd_ordering}
%description relaysrv
Syncthing requires relay servers for NAT traversal. This package
@ -95,8 +97,10 @@ install -Dpm 0644 %{name}.firewall \
%pre relaysrv
%service_add_pre strelaysrv.service
/usr/sbin/groupadd -r strelaysrv &>/dev/null ||:
/usr/sbin/useradd -g strelaysrv -s /bin/false -r -c "User for syncthing relay server" -d /var/lib/strelaysrv strelaysrv &>/dev/null ||:
getent group strelaysrv >/dev/null || /usr/sbin/groupadd -r strelaysrv
getent passwd strelaysrv >/dev/null || \
/usr/sbin/useradd -g strelaysrv -s /bin/false -r \
-c "User for syncthing relay server" -d /var/lib/strelaysrv strelaysrv
%post
%service_add_post %{name}-resume.service