Files
rocm-systems/server/rdc.service
T
Chris Freehill 5cc498c6aa Make rdcd run as user "rdc"
The rdc account will be created on installation if it does
not already exist. It will be a system account with no
home directory.

rdcd will be started as a systemd service, but change to
user "rdc". The rdc user will drop all priviliges except
CAP_DAC_OVERRIDE, permitted. This means the default mode
will have no special privileges, but have the ability to
gain write access (e.g., to sysfs) when needed.

rdc tests were being inadvertantly added to the
installation. This was adversely impacting the new
functionality, so it was corrected in this commit.

Also included are a few small formatting changes.

Change-Id: I9c6bb132fee28119fd3960594dfb97bd2e7b282a
2020-08-17 14:07:25 -05:00

47 rader
1020 B
Desktop File
Executable File

# References:
# https://linuxconfig.org/how-to-create-systemd-service-unit-in-linux
# https://www.linux.com/tutorials/systemd-services-beyond-starting-and-stopping/
[Unit]
Description=Radeon Data Center Daemon (rdcd)
After=network.target
# Add any services that must be started before rdcd here
#After=
# Add any non-service units required by rdcd here
#Requires=
[Service]
User=rdc
Group=rdc
Type=simple
CapabilityBoundingSet=CAP_DAC_OVERRIDE
AmbientCapabilities=CAP_DAC_OVERRIDE
# If we need to start anything before rdcd, use this
# ExecStartPre=
ExecStart=/usr/sbin/rdcd
# If we need to start anything after rdcd use this
# ExecStartPost=
# If we want to change the default time out for the ExecStop (90 sec),
# we can modify that time limit with TimeoutStopSec
# TimeoutStopSec=
# Note, we can have multiple ExecStop commands if necessary
ExecStop=/bin/kill -15 $MAINPID
#ExecReload=
#ExecStartPost=
#ExecStopPost=
# StandardOutput=journal
# StandardError=inherit
[Install]
WantedBy= multi-user.target