From 25b2f2209a9cf22163db7358870bfed4f6fe1064 Mon Sep 17 00:00:00 2001 From: Eunmin Lim Date: Thu, 27 Dec 2018 17:04:48 +0900 Subject: [PATCH] Add systemd service file :Release Notes: This patch is adding the systemd service file :Detailed Notes: This patch installs systemd related files. It includes systemd service file and script file, occasionally. The files would be installed at /etc/systemd/system Wiki page regarding decentralize systemd files: https://wiki.lgsvl.com/display/webOSDocs/Decentralize+systemd+files :Testing Performed: Build ok, The files are installed at /etc/systemd/system :QA Notes: :Issues Addressed: [PLAT-68059] Decentralize systemd units to each component #2 Change-Id: I2c7f1446bab3241037005fda96df29fbf54c4cab Reviewed-on: http://gpro.lge.com/226318 Reviewed-by: Yogish S Tested-by: Yogish S --- files/launch/configurator-activity.service.in | 27 +++++++++++++++++++ files/launch/configurator-db8.service.in | 27 +++++++++++++++++++ files/launch/configurator-db8.sh.in | 24 +++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 files/launch/configurator-activity.service.in create mode 100644 files/launch/configurator-db8.service.in create mode 100644 files/launch/configurator-db8.sh.in diff --git a/files/launch/configurator-activity.service.in b/files/launch/configurator-activity.service.in new file mode 100644 index 0000000..2bca21e --- /dev/null +++ b/files/launch/configurator-activity.service.in @@ -0,0 +1,27 @@ +# Copyright (c) 2019 LG Electronics, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +[Unit] +Description=default - "%n" +Requires=ls-hubd.service configurator-db8.service +After=ls-hubd.service configurator-db8.service activitymanager.service +BindsTo=activitymanager.service + +[Service] +Type=oneshot +ExecStartPre=@WEBOS_INSTALL_BINDIR@/logger -s "Configuring activities asynchronously" +ExecStart=@WEBOS_INSTALL_BINDIR@/luna-send -n 1 -f palm://com.palm.configurator/run '{"types":["activities"]}' +RemainAfterExit=yes diff --git a/files/launch/configurator-db8.service.in b/files/launch/configurator-db8.service.in new file mode 100644 index 0000000..96a44c4 --- /dev/null +++ b/files/launch/configurator-db8.service.in @@ -0,0 +1,27 @@ +# Copyright (c) 2019 LG Electronics, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +# Creates the database schema for webos Applications. + +[Unit] +Description=default - "%n" +Requires=ls-hubd.service db8.service +After=ls-hubd.service db8.service + +[Service] +Type=oneshot +ExecStart=/etc/systemd/system/scripts/configurator-db8.sh +RemainAfterExit=yes diff --git a/files/launch/configurator-db8.sh.in b/files/launch/configurator-db8.sh.in new file mode 100644 index 0000000..0bb36ce --- /dev/null +++ b/files/launch/configurator-db8.sh.in @@ -0,0 +1,24 @@ +#!/bin/sh +# Copyright (c) 2019 LG Electronics, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +# first pass we register file cache and dbkinds +logger -s "Configuring dbkinds & filecache" +@WEBOS_INSTALL_BINDIR@/luna-send -n 1 palm://com.palm.configurator/run '{"types":["dbkinds","filecache"]}' + +# This has to happen *after* the kinds are created. +logger -s "Configuring dbpermissions" +@WEBOS_INSTALL_BINDIR@/luna-send -n 1 palm://com.palm.configurator/run '{"types":["dbpermissions"]}'