Skip to content

Commit

Permalink
Add systemd service file
Browse files Browse the repository at this point in the history
: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 <[email protected]>
Tested-by: Yogish S <[email protected]>
  • Loading branch information
eunminlim authored and manjuraehmad.momin committed May 25, 2023
1 parent 4d9a66b commit 25b2f22
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
27 changes: 27 additions & 0 deletions files/launch/configurator-activity.service.in
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions files/launch/configurator-db8.service.in
Original file line number Diff line number Diff line change
@@ -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
24 changes: 24 additions & 0 deletions files/launch/configurator-db8.sh.in
Original file line number Diff line number Diff line change
@@ -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"]}'

0 comments on commit 25b2f22

Please sign in to comment.