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

openharmony-standard: Run distributeddata as systemd service


Signed-off-by: default avatarEsben Haabendal <esben@geanix.com>
parent be83edcf
No related branches found
No related tags found
1 merge request!109Systemd service integration and stability improvements
[Unit]
Description=OpenHarmony Distributed Data service
Description=OpenHarmony Distributed Data service (SA: 1301)
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
[Service]
Type=oneshot
ExecStart=/bin/echo "OpenHarmony Distributed Data Service"
RemainAfterExit=yes
Type=notify
User=system
Group=system
SupplementaryGroups=shell readproc
CapabilityBoundingSet=CAP_DAC_READ_SEARCH
LimitNICE=40
ExecStart=/usr/bin/sa_main /system/profile/distributeddata.xml
[Install]
WantedBy=multi-user.target
......@@ -136,23 +136,6 @@ fi
#sa_main /system/profile/dps_service.xml & # SA: 1401 180 3502
#sleep "$STARTUP_CMD_SLEEP"
# trigger: boot
# "name" : "distributeddata",
# "path" : ["/system/bin/sa_main","/system/profile/distributeddata.xml"],
# "caps" : ["DAC_READ_SEARCH"],
# "uid" : "system",
# "gid" : ["system","shell","readproc"],
# "writepid":[
# "/dev/cpuset/foreground/tasks",
# "/dev/stune/foreground/tasks",
# "/dev/blkio/foreground/tasks"
# ]
if systemctl -q is-enabled distributed_data.service; then
echo >/dev/console "Starting OpenHarmony distributeddata service"
su system -c '/system/bin/sa_main /system/profile/distributeddata.xml &' # SA: 1301
sleep "$STARTUP_CMD_SLEEP"
fi
# trigger: boot
# "name" : "time_service",
# "path" : ["/system/bin/sa_main", "/system/profile/time_service.xml"],
......
......@@ -2037,6 +2037,7 @@ USERADD_PARAM:${PN} = "-u 1000 -U -s /bin/sh system"
USERADD_PARAM:${PN}:append = ";-u 1007 -U -s /bin/false log"
USERADD_PARAM:${PN}:append = ";-u 1036 -U -s /bin/false logd"
USERADD_PARAM:${PN}:append = ";-u 2000 -U -s /bin/false shell"
USERADD_PARAM:${PN}:append = ";-u 3009 -U -s /bin/false readproc"
# system haps
PACKAGES =+ "${PN}-systemhaps"
......
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