diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-03-08 12:25:40 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-03-08 12:26:16 -0800 |
| commit | 748ad8a978cd0a2e526dc58febf6c45d37135849 (patch) | |
| tree | 38adb6111b338601ccdcc139617f5f8cdc1859bc | |
| parent | d2f897f8de5e736a73c01e140bc8a63bd3a00326 (diff) | |
| download | infinitytier-748ad8a978cd0a2e526dc58febf6c45d37135849.tar.gz infinitytier-748ad8a978cd0a2e526dc58febf6c45d37135849.zip | |
create zerotier-one user via rpm
| -rw-r--r-- | zerotier-one.spec | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/zerotier-one.spec b/zerotier-one.spec index d8f2582e..59fd2484 100644 --- a/zerotier-one.spec +++ b/zerotier-one.spec @@ -18,6 +18,7 @@ Requires: iproute %if 0%{?rhel} >= 7 Requires: systemd +Requires(pre): /usr/sbin/useradd, /usr/bin/getent %endif %if 0%{?rhel} <= 6 @@ -54,6 +55,14 @@ containers (Docker, OpenVZ, etc.). #make CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" ZT_USE_MINIUPNPC=1 %{?_smp_mflags} one manpages selftest #%endif +%pre +%if 0%{?rhel} >= 7 +/usr/bin/getent passwd zerotier-one || /usr/sbin/useradd -r -d /var/lib/zerotier-one -s /sbin/nologin zerotier-one +%endif +%if 0%{?fedora} >= 21 +/usr/bin/getent passwd zerotier-one || /usr/sbin/useradd -r -d /var/lib/zerotier-one -s /sbin/nologin zerotier-one +%endif + %install rm -rf $RPM_BUILD_ROOT pushd %{getenv:PWD} |
