From a833f980ecebaeca2a45571d6fe74c862f11fb55 Mon Sep 17 00:00:00 2001 From: Sangchul Lee Date: Wed, 26 Oct 2016 12:05:51 +0900 Subject: [PATCH] Change spec and service file to launch murphyd for system-wide and to change UID/GID to multimedia_fw Change-Id: I5f43dc25215d427e7e90f8ab198763e7888bb6a8 Signed-off-by: Sangchul Lee --- packaging/murphy.spec | 11 +++++------ packaging/murphyd.service | 7 +++++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/packaging/murphy.spec b/packaging/murphy.spec index eca92a8..f8c9355 100644 --- a/packaging/murphy.spec +++ b/packaging/murphy.spec @@ -293,9 +293,8 @@ mkdir -p %{buildroot}%{_tmpfilesdir} cp packaging/murphyd.conf %{buildroot}%{_tmpfilesdir} # Copy the systemd files in place. -#mkdir -p %%{buildroot}%%{_unitdir} -mkdir -p %{buildroot}%{_unitdir_user} -cp packaging/murphyd.service %{buildroot}%{_unitdir_user} +mkdir -p %{buildroot}%{_unitdir} +cp packaging/murphyd.service %{buildroot}%{_unitdir} %if %{with dbus} mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d @@ -309,13 +308,13 @@ cp packaging/org.Murphy.conf \ rm -rf %{buildroot} %post -/bin/systemctl --user enable --global murphyd.service +/bin/systemctl enable murphyd.service #setcap 'cap_net_admin=+ep' %{_bindir}/murphyd ldconfig %postun if [ "$1" = "0" ]; then -systemctl --user disable --global murphyd.service +systemctl disable murphyd.service fi ldconfig @@ -356,7 +355,7 @@ ldconfig %manifest murphy.manifest %{_bindir}/murphyd %config %{_sysconfdir}/murphy -%{_unitdir_user}/murphyd.service +%{_unitdir}/murphyd.service %{_tmpfilesdir}/murphyd.conf %if %{with dbus} %{_sysconfdir}/dbus-1/system.d diff --git a/packaging/murphyd.service b/packaging/murphyd.service index 60842b1..c31e165 100644 --- a/packaging/murphyd.service +++ b/packaging/murphyd.service @@ -2,9 +2,12 @@ Description=Murphy Resource Policy Daemon [Service] -Type=simple ExecStart=/usr/bin/murphyd -t dlog -vvv -f -KillSignal=SIGTERM +Restart=always +RestartSec=0 +User=multimedia_fw +Group=multimedia_fw +SmackProcessLabel=System [Install] WantedBy=default.target -- 2.34.1