Skip to content
Snippets Groups Projects
Commit bfb585ed authored by Esben Haabendal's avatar Esben Haabendal
Browse files

openharmony-standard: Run foundation as systemd service


Signed-off-by: default avatarEsben Haabendal <esben@geanix.com>
parent d3a2d69f
No related branches found
No related tags found
1 merge request!109Systemd service integration and stability improvements
[Unit] [Unit]
Description=OpenHarmony foundation service Description=OpenHarmony foundation service (SA: 180 182 401 403 501 3203 3299 3301 3302 3308 3501 3702 4010 4802)
Requires=samgr.service
After=samgr.service
# Logging to hilogd, but seems to work without it
Wants=hilogd.service
After=hilogd.service
# Requires SA: 4700
Wants=dsoftbus.service
# Requires SA: 4701
Wants=deviceauth.service
# Requires SA: 511
Wants=installs.service
# Requires SA: 3510
Wants=huks.service
# Requires SA: 1301
Wants=distributed_data.service
# Requires SA: 3202 5001 -- but from where?
[Service] [Service]
Type=oneshot Type=notify
ExecStart=/bin/echo "OpenHarmony foundation Service" Environment="XDG_RUNTIME_DIR=/data/weston"
RemainAfterExit=yes Environment="XKB_CONFIG_ROOT=/etc/openharmony/xkb"
Environment="XKB_CONFIG_EXTRA_PATH=/etc/openharmony/xkb"
User=system
Group=system
CapabilityBoundingSet=CAP_SYS_PTRACE CAP_KILL
LimitNICE=40
ExecStart=/usr/bin/sa_main /system/profile/foundation.xml
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
...@@ -136,19 +136,6 @@ fi ...@@ -136,19 +136,6 @@ fi
#sa_main /system/profile/dps_service.xml & # SA: 1401 180 3502 #sa_main /system/profile/dps_service.xml & # SA: 1401 180 3502
#sleep "$STARTUP_CMD_SLEEP" #sleep "$STARTUP_CMD_SLEEP"
# trigger: boot
# "name" : "foundation",
# "path" : ["/system/bin/sa_main", "/system/profile/foundation.xml"],
# "importance" : -20,
# "uid" : "system",
# "gid" : ["system"],
# "caps" : ["SYS_PTRACE", "KILL"]
if systemctl -q is-enabled foundation.service; then
echo >/dev/console "Starting OpenHarmony foundation service"
su system -c '/system/bin/sa_main /system/profile/foundation.xml &' # SA: 180 182 3203 3299 3301 3308 3501 4010 | Required SA: 4700
sleep "$STARTUP_CMD_SLEEP"
fi
# trigger: boot # trigger: boot
# "name" : "media_service", # "name" : "media_service",
# "path" : ["/system/bin/sa_main", "/system/profile/media_service.xml"], # "path" : ["/system/bin/sa_main", "/system/profile/media_service.xml"],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment