summaryrefslogtreecommitdiff
path: root/net-misc/xmrig/files/xmrig.service
blob: 8b59fc0c131fba170479a581bec44e238321f2d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
[Unit]
Description=XMRig Monero Miner
After=network-online.target
AssertFileNotEmpty=/etc/xmrig/config.json

[Service]
ExecStartPre=+/usr/bin/randomx_boost.sh
ExecStartPre=+/usr/bin/enable_1gb_pages.sh
ExecStartPre=/usr/bin/xmrig --config=/etc/xmrig/config.json --dry-run
ExecStart=/usr/bin/xmrig --config=/etc/xmrig/config.json
StandardOutput=journal
StandardError=journal
DynamicUser=true
CPUSchedulingPolicy=idle
PrivateTmp=true
ProtectHome=true
ProtectSystem=strict
NoNewPrivileges=true
PrivateDevices=true
CapabilityBoundingSet=
ProtectClock=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
RestrictNamespaces=true
PrivateUsers=true
ConfigurationDirectory=xmrig

[Install]
WantedBy=multi-user.target