aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/osmo-bsc.spec.in
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/osmo-bsc.spec.in')
-rw-r--r--contrib/osmo-bsc.spec.in16
1 files changed, 15 insertions, 1 deletions
diff --git a/contrib/osmo-bsc.spec.in b/contrib/osmo-bsc.spec.in
index 0a9c9f31f..7b7777def 100644
--- a/contrib/osmo-bsc.spec.in
+++ b/contrib/osmo-bsc.spec.in
@@ -97,19 +97,33 @@ make %{?_smp_mflags}
%install
%make_install
-%if 0%{?suse_version}
%preun
+%if 0%{?suse_version}
%service_del_preun %{name}.service
+%endif
%postun
+%if 0%{?suse_version}
%service_del_postun %{name}.service
+%endif
%pre
+getent group osmocom >/dev/null || groupadd --system osmocom
+getent passwd osmocom >/dev/null || useradd --system --gid osmocom --home-dir /var/lib/osmocom \
+ --shell /sbin/nologin --comment "Open Source Mobile Communications" osmocom
+%if 0%{?suse_version}
%service_add_pre %{name}.service
+%endif
%post
+%if 0%{?suse_version}
%service_add_post %{name}.service
%endif
+chown osmocom:osmocom /etc/osmocom/osmo-bsc.cfg
+chmod 0660 /etc/osmocom/osmo-bsc.cfg
+chown root:osmocom /etc/osmocom
+chmod 2775 /etc/osmocom
+
%check
make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)