From 71ef4b2e33e682ead93afc90409e5e55e0f83fab Mon Sep 17 00:00:00 2001
From: CoprDistGit <infra@openeuler.org>
Date: Fri, 16 Aug 2024 22:05:20 +0000
Subject: automatic import of freerouter

---
 freerouter-p4urng.service | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 freerouter-p4urng.service

(limited to 'freerouter-p4urng.service')

diff --git a/freerouter-p4urng.service b/freerouter-p4urng.service
new file mode 100644
index 0000000..e9cdb28
--- /dev/null
+++ b/freerouter-p4urng.service
@@ -0,0 +1,34 @@
+[Unit]
+Description=p4urng specific process of freerouter
+Requires=freerouter.service freerouter-native@cpu_port.service network.target
+After=freerouter.service freerouter-native@cpu_port.service network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/p4urng.bin 127.0.0.1 9080 2 eth1 eth2 veth250
+Restart=always
+RestartSec=5
+WorkingDirectory=/var/lib/freerouter
+User=freerouter
+Group=freerouter
+CapabilityBoundingSet=CAP_NET_RAW CAP_NET_ADMIN CAP_IPC_LOCK
+AmbientCapabilities=CAP_NET_RAW CAP_NET_ADMIN CAP_IPC_LOCK
+NoNewPrivileges=true
+ProtectSystem=strict
+ProtectHome=true
+ReadWritePaths=/var/lib/freerouter /etc/freerouter
+PrivateTmp=true
+# PrivateDevices is not possible because some types need access to a physical device.
+PrivateDevices=false
+PrivateNetwork=false
+# Private Users clears all capabilities.
+PrivateUsers=false
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectControlGroups=true
+RestrictNamespaces=true
+LockPersonality=true
+RemoveIPC=true
+
+[Install]
+WantedBy=multi-user.target
-- 
cgit v1.2.3