Change-Id: I0018bdbf3c09b7211245d2be8520ae11f0657749
Type=simple
ExecStart=/usr/bin/iotcon-daemon
Restart=always
+User=iotcon
[Install]
WantedBy=multi-user.target
%if "%{tizen}" == "2.3"
BuildRequires: python-xml
%endif
+Requires(post): /usr/bin/getent, /usr/bin/useradd, /usr/bin/groupadd
Requires(post): /sbin/ldconfig, /usr/bin/systemctl
Requires(postun): /sbin/ldconfig, /usr/bin/systemctl
%post
+
+getent group iotcon > /dev/null || groupadd -r iotcon
+getent passwd iotcon > /dev/null || useradd -r -g iotcon -d '/var/lib/empty' -s /sbin/nologin -c "iotcon daemon" iotcon
+
systemctl daemon-reload
if [ $1 == 1 ]; then
systemctl restart %{name}.service