[systemd-devel] Which unit type and which parameter to use

Reindl Harald h.reindl at thelounge.net
Sun Feb 17 09:52:08 UTC 2019



Am 17.02.19 um 04:04 schrieb Dequan Zhang:
> I have a cli application that will be opened when remote user log in
> through ssh.
> 
> Should I create a service file for such application? 
> 
> And since CLI requires a controlling terminal, what should I do to set
> up the unit file? 
> 
> Last, how can I use systemd to do resource management for the cli
> application? 

systemd-run

alias tshark='/usr/bin/systemd-run -t -p User=wireshark -p
Group=wireshark -p "AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW" -p
"CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW" -p PrivateTmp=yes -p
ProtectSystem=full -p ProtectControlGroups=yes -p
ProtectKernelModules=yes -p ProtectKernelTunables=yes -p
MemoryDenyWriteExecute=yes --quiet --wait /usr/bin/tshark -i wan -p -t u
-T "tabs"'


More information about the systemd-devel mailing list