From: Maciej Wereski Date: Tue, 11 Jun 2013 12:43:32 +0000 (+0200) Subject: [systemd] remove initscripts and fix service file X-Git-Tag: submit/tizen_2.2/20130714.152008~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e683f14704d241992ad3e0ff74f25a5bb0fcb6c;p=framework%2Fmessaging%2Fmsg-service.git [systemd] remove initscripts and fix service file Change-Id: I3ae91895d85ab7fc241ab631290f78eb19b2eb68 Signed-off-by: Maciej Wereski --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 80f7df6..cc9370c 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,9 +55,6 @@ INSTALL(FILES ${RINGTONE-FILES} DESTINATION /usr/share/media/) CONFIGURE_FILE(msg-service.pc.in msg-service.pc @ONLY) INSTALL(FILES ${CMAKE_BINARY_DIR}/msg-service.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) -SET(RC_LOCAL_SCRIPT msg-server) -INSTALL(PROGRAMS ${RC_LOCAL_SCRIPT} DESTINATION /etc/rc.d/init.d) - INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/packaging/msg-service.service DESTINATION /usr/lib/systemd/system) # LICENSE file diff --git a/msg-server b/msg-server deleted file mode 100755 index 394be13..0000000 --- a/msg-server +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -## A script for running msg-server in booting time. - -# log -#dlogutil -v threadtime -f /var/log/msgfw/msgfw.log -r 1000 -n 10 MSG_SERVICE & - -# msg-server -/usr/bin/msg-server & - diff --git a/packaging/msg-service.service b/packaging/msg-service.service index 24b19c0..0c41b56 100755 --- a/packaging/msg-service.service +++ b/packaging/msg-service.service @@ -1,13 +1,11 @@ - [Unit] -Description=Start the msg-server +Description=Messaging Framework [Service] -Type=forking -ExecStart=/etc/rc.d/init.d/msg-server +ExecStart=/usr/bin/msg-server Nice=5 OOMScoreAdjust=-100 Restart=always [Install] -WantedBy=tizen-middleware.target \ No newline at end of file +WantedBy=multi-user.target diff --git a/packaging/msg-service.spec b/packaging/msg-service.spec index e5b157d..93056a7 100755 --- a/packaging/msg-service.spec +++ b/packaging/msg-service.spec @@ -1,6 +1,6 @@ Name: msg-service Version: 0.9.4 -Release: 1 +Release: 2 License: Flora Summary: Messaging Framework Library Group: System/Libraries @@ -111,13 +111,8 @@ mkdir -p %{buildroot}/var/log/msgfw %make_install -mkdir -p %{buildroot}/usr/lib/systemd/system/network.target.wants -ln -s ../msg-service.service %{buildroot}/usr/lib/systemd/system/network.target.wants/msg-service.service - -mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc3.d -ln -s %{_sysconfdir}/rc.d/init.d/msg-server %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S70msg-server -mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc5.d -ln -s %{_sysconfdir}/rc.d/init.d/msg-server %{buildroot}%{_sysconfdir}/rc.d/rc5.d/S70msg-server +mkdir -p %{buildroot}/usr/lib/systemd/system/multi-user.target.wants +ln -s ../msg-service.service %{buildroot}/usr/lib/systemd/system/multi-user.target.wants/msg-service.service mkdir -p %{buildroot}/opt/usr/data/msg-service @@ -360,9 +355,6 @@ chgrp db_msg_service /opt/usr/data/msg-service if [ -f /usr/lib/rpm-plugins/msm.so ] then chsmack -a 'msg-service::db' /opt/usr/dbspace/.msg_service.db* - chsmack -a "_" -e "_" /etc/rc.d/init.d/msg-server - chsmack -a "_" -e "_" /etc/rc.d/rc3.d/S70msg-server - chsmack -a "_" -e "_" /etc/rc.d/rc5.d/S70msg-server fi ########## Setting Config Value (Internal keys) ########## @@ -537,11 +529,8 @@ fi %{_bindir}/msg-server %{_datadir}/media/Sherbet.wav %attr(0644,root,root)/usr/share/msg-service/plugin.cfg -%{_sysconfdir}/rc.d/init.d/msg-server -%{_sysconfdir}/rc.d/rc3.d/S70msg-server -%{_sysconfdir}/rc.d/rc5.d/S70msg-server /usr/lib/systemd/system/msg-service.service -/usr/lib/systemd/system/network.target.wants/msg-service.service +/usr/lib/systemd/system/multi-user.target.wants/msg-service.service /usr/share/license/msg-service/LICENSE.Flora /opt/etc/smack/accesses.d/msg-service.rule /etc/config/sysinfo-message.xml