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

openharmony-standard: Run time_service as systemd service


Signed-off-by: default avatarEsben Haabendal <esben@geanix.com>
parent 5bbb1843
No related branches found
No related tags found
1 merge request!109Systemd service integration and stability improvements
......@@ -136,18 +136,6 @@ fi
#sa_main /system/profile/dps_service.xml & # SA: 1401 180 3502
#sleep "$STARTUP_CMD_SLEEP"
# trigger: boot
# "name" : "time_service",
# "path" : ["/system/bin/sa_main", "/system/profile/time_service.xml"],
# "uid" : "system",
# "gid" : ["system", "shell"],
# "caps" : ["SYS_TIME", "WAKE_ALARM"]
if systemctl -q is-enabled time.service; then
echo >/dev/console "Starting OpenHarmony time service"
su system -c '/system/bin/sa_main /system/profile/time_service.xml &' # SA: 1401 180 3702
sleep "$STARTUP_CMD_SLEEP"
fi
# trigger: boot
# "name" : "foundation",
# "path" : ["/system/bin/sa_main", "/system/profile/foundation.xml"],
......
[Unit]
Description=OpenHarmony Time service
Description=OpenHarmony Time service (SA: 1401 180 3702)
Requires=samgr.service
After=samgr.service
# Logging to hilogd, but seems to work without it
Wants=hilogd.service
After=hilogd.service
[Service]
Type=oneshot
ExecStart=/bin/echo "OpenHarmony Time Service"
RemainAfterExit=yes
Type=notify
User=system
Group=system
SupplementaryGroups=shell
CapabilityBoundingSet=CAP_SYS_TIME CAP_WAKE_ALARM
LimitNICE=40
ExecStart=/usr/bin/sa_main /system/profile/time_service.xml
[Install]
WantedBy=multi-user.target
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